some more win32'fication to fix non-ascii filename handling
[kdelibs.git] / plasma / CMakeLists.txt
blob75b5d46537b5089966ca9c12d6f4a2f36beeaeb1
2 include_directories(${CMAKE_CURRENT_SOURCE_DIR}
3                     ${CMAKE_BINARY_DIR}/kdecore/
4                     ${CMAKE_SOURCE_DIR}/kdecore/
5                     ${CMAKE_SOURCE_DIR}/kdecore/config
6                     ${CMAKE_SOURCE_DIR}/kdecore/jobs
7                     ${CMAKE_SOURCE_DIR}/kdecore/kernel
8                     ${CMAKE_SOURCE_DIR}/kdecore/localization
9                     ${CMAKE_SOURCE_DIR}/kdecore/io
10                     ${CMAKE_SOURCE_DIR}/kdecore/services
11                     ${CMAKE_SOURCE_DIR}/kdecore/sycoca
12                     ${CMAKE_SOURCE_DIR}/kdecore/util
13                     ${CMAKE_BINARY_DIR}/kdeui/
14                     ${CMAKE_SOURCE_DIR}/kdeui/
15                     ${CMAKE_SOURCE_DIR}/kdeui/actions
16                     ${CMAKE_SOURCE_DIR}/kdeui/about
17                     ${CMAKE_SOURCE_DIR}/kdeui/config
18                     ${CMAKE_SOURCE_DIR}/kdeui/colors
19                     ${CMAKE_SOURCE_DIR}/kdeui/dialogs
20                     ${CMAKE_SOURCE_DIR}/kdeui/kernel
21                     ${CMAKE_SOURCE_DIR}/kdeui/icons
22                     ${CMAKE_SOURCE_DIR}/kdeui/paged
23                     ${CMAKE_SOURCE_DIR}/kdeui/shortcuts
24                     ${CMAKE_SOURCE_DIR}/kdeui/util
25                     ${CMAKE_SOURCE_DIR}/kdeui/widgets
26                     ${CMAKE_SOURCE_DIR}/kdeui/windowmanagement
27                     ${CMAKE_SOURCE_DIR}/kio
28                     ${CMAKE_SOURCE_DIR}/kio/kio
29                     ${CMAKE_SOURCE_DIR}/kio/kfile
30                     ${CMAKE_SOURCE_DIR}/knewstuff/
31                     ${CMAKE_BINARY_DIR}/solid/
32                     ${CMAKE_SOURCE_DIR}/solid/
33                     ${CMAKE_SOURCE_DIR}/threadweaver/
34                     ${KDE4_INCLUDES})
35 if(QT_QTOPENGL_FOUND AND OPENGL_FOUND)
36     # libGL needs dlopen() and friends from the dl library
37     find_library(DL_LIBRARY dl)
38     include_directories(${OPENGL_INCLUDE_DIR})
39 endif(QT_QTOPENGL_FOUND AND OPENGL_FOUND)
41 add_subdirectory(tests)
42 add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1209)
44 ########### next target ###############
46 set(plasmagik_SRCS
47     packagemetadata.cpp
48     packagestructure.cpp
49     package.cpp
50     )
52 set(plasma_LIB_SRCS
53     ${plasmagik_SRCS}
54     abstractrunner.cpp
55     animationdriver.cpp
56     animator.cpp
57     applet.cpp
58     configloader.cpp
59     containment.cpp
60     context.cpp
61     corona.cpp
62     datacontainer.cpp
63     dataengine.cpp
64     dataenginemanager.cpp
65     delegate.cpp
66     dialog.cpp
67     extender.cpp
68     extenderitem.cpp
69     paintutils.cpp
70     framesvg.cpp
71     plasma.cpp
72     popupapplet.cpp
73     private/applethandle.cpp
74     private/datacontainer_p.cpp
75     private/desktoptoolbox.cpp
76     private/extenderapplet.cpp
77     private/extenderitemmimedata.cpp
78     private/nativetabbar.cpp
79     private/packages.cpp
80     private/paneltoolbox.cpp
81     private/runnerjobs.cpp
82     private/style.cpp
83     private/toolbox.cpp
84     private/tooltip.cpp
85     private/windowpreview.cpp
86     querymatch.cpp
87     runnercontext.cpp
88     runnermanager.cpp
89     scripting/appletscript.cpp
90     scripting/dataenginescript.cpp
91     scripting/runnerscript.cpp
92     scripting/scriptengine.cpp
93     service.cpp
94     servicejob.cpp
95     svg.cpp
96     theme.cpp
97     tooltipcontent.cpp
98     tooltipmanager.cpp
99     version.cpp
100     view.cpp
101     wallpaper.cpp
102     widgets/checkbox.cpp
103     widgets/combobox.cpp
104     widgets/flashinglabel.cpp
105     widgets/frame.cpp
106     widgets/groupbox.cpp
107     widgets/iconwidget.cpp
108     widgets/label.cpp
109     widgets/lineedit.cpp
110     widgets/meter.cpp
111     widgets/pushbutton.cpp
112     widgets/radiobutton.cpp
113     widgets/scrollbar.cpp
114     widgets/signalplotter.cpp
115     widgets/slider.cpp
116     widgets/spinbox.cpp
117     widgets/toolbutton.cpp
118     widgets/busywidget.cpp
119     widgets/scrollwidget.cpp
120     widgets/svgwidget.cpp
121     widgets/tabbar.cpp
122     widgets/textbrowser.cpp
123     widgets/treeview.cpp
124     widgets/textedit.cpp
125     widgets/webview.cpp
128 #NEPOMUK_GENERATE_FROM_ONTOLOGY(
129 #   nwc.nrl
130 #   ${metadata_test_BINARY_DIR}
131 #   TEST_HEADERS
132 #   TEST_SOURCES
133 #   TEST_INCLUDES
136 if(QT_QTOPENGL_FOUND AND OPENGL_FOUND)
137     message(STATUS "Adding support for OpenGL applets to libplasma")
138     set(plasma_LIB_SRCS
139         ${plasma_LIB_SRCS}
140         glapplet.cpp)
141 endif(QT_QTOPENGL_FOUND AND OPENGL_FOUND)
143 if (PHONON_FOUND)
144     message(STATUS "Adding support for Phonon to libplasma")
145     set(plasma_LIB_SRCS
146         ${plasma_LIB_SRCS}
147         widgets/videowidget.cpp)
148 endif(PHONON_FOUND)
150 kde4_add_library(plasma SHARED ${plasma_LIB_SRCS})
152 target_link_libraries(plasma ${KDE4_KIO_LIBS} ${KDE4_KFILE_LIBS} knewstuff2
153                              ${QT_QTUITOOLS_LIBRARY} ${QT_QTWEBKIT_LIBRARY}
154                              threadweaver ${KDE4_SOLID_LIBS} )
155 if(X11_FOUND)
156    target_link_libraries(plasma ${X11_LIBRARIES})
157 endif(X11_FOUND)
159 if(PHONON_FOUND)
160    target_link_libraries(plasma ${KDE4_PHONON_LIBS})
161 endif(PHONON_FOUND)
163 if(DL_LIBRARY)
164     target_link_libraries(plasma ${DL_LIBRARY})
165 endif(DL_LIBRARY)
167 if(QT_QTOPENGL_FOUND AND OPENGL_FOUND)
168     target_link_libraries(plasma ${QT_QTOPENGL_LIBRARY} ${OPENGL_gl_LIBRARY})
169 endif(QT_QTOPENGL_FOUND AND OPENGL_FOUND)
171 target_link_libraries(plasma LINK_INTERFACE_LIBRARIES kdeui kdecore ${QT_QTGUI_LIBRARY})
173 #do NOT use GENERIC versioning -- the plasma team will take care of versioning
174 set_target_properties(plasma PROPERTIES
175                              VERSION 3.0.0
176                              SOVERSION 3
177                       )
179 install(TARGETS plasma EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
182 ########### install files ###############
184 set(plasmagik_HEADERS
185     packagemetadata.h
186     packagestructure.h
187     package.h
188     )
190 install(FILES ${plasmagik_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/plasma/ COMPONENT Devel)
192 set(plasma_LIB_INCLUDES
193     abstractrunner.h
194     animationdriver.h
195     animator.h
196     applet.h
197     configloader.h
198     containment.h
199     context.h
200     corona.h
201     datacontainer.h
202     dataengine.h
203     dataenginemanager.h
204     delegate.h
205     dialog.h
206     extender.h
207     extenderitem.h
208     paintutils.h
209     framesvg.h
210     plasma.h
211     plasma_export.h
212     popupapplet.h
213     querymatch.h
214     runnercontext.h
215     runnermanager.h
216     service.h
217     servicejob.h
218     svg.h
219     theme.h
220     tooltipcontent.h
221     tooltipmanager.h
222     tooltipmanager.h
223     version.h
224     view.h
225     wallpaper.h)
227 if(QT_QTOPENGL_FOUND AND OPENGL_FOUND)
228     set(plasma_LIB_INCLUDES
229         ${plasma_LIB_INCLUDES}
230         glapplet.h)
231 endif(QT_QTOPENGL_FOUND AND OPENGL_FOUND)
233 install(FILES
234         ${plasma_LIB_INCLUDES}
235         DESTINATION ${INCLUDE_INSTALL_DIR}/plasma COMPONENT Devel)
237 install(FILES
238     widgets/checkbox.h
239     widgets/combobox.h
240     widgets/flashinglabel.h
241     widgets/frame.h
242     widgets/groupbox.h
243     widgets/iconwidget.h
244     widgets/label.h
245     widgets/lineedit.h
246     widgets/meter.h
247     widgets/pushbutton.h
248     widgets/toolbutton.h
249     widgets/radiobutton.h
250     widgets/scrollbar.h
251     widgets/signalplotter.h
252     widgets/slider.h
253     widgets/spinbox.h
254     widgets/busywidget.h
255     widgets/svgwidget.h
256     widgets/scrollwidget.h
257     widgets/tabbar.h
258     widgets/textbrowser.h
259     widgets/treeview.h
260     widgets/textedit.h
261     widgets/webview.h
262     DESTINATION ${INCLUDE_INSTALL_DIR}/plasma/widgets COMPONENT Devel)
264 install(FILES
265     scripting/appletscript.h
266     scripting/dataenginescript.h
267     scripting/runnerscript.h
268     scripting/scriptengine.h
269     DESTINATION ${INCLUDE_INSTALL_DIR}/plasma/scripting COMPONENT Devel)
271 if(PHONON_FOUND)
272     install (FILES
273         widgets/videowidget.h
274         DESTINATION ${INCLUDE_INSTALL_DIR}/plasma/widgets COMPONENT Devel)
275 endif(PHONON_FOUND)
277 install(FILES
278    servicetypes/plasma-animator.desktop
279    servicetypes/plasma-applet.desktop
280    servicetypes/plasma-containment.desktop
281    servicetypes/plasma-dataengine.desktop
282    servicetypes/plasma-packagestructure.desktop
283    servicetypes/plasma-runner.desktop
284    servicetypes/plasma-scriptengine.desktop
285    servicetypes/plasma-wallpaper.desktop
286    DESTINATION ${SERVICETYPES_INSTALL_DIR})
288 install(FILES
289    servicetypes/plasma-applet-extenderapplet.desktop
290    DESTINATION ${SERVICES_INSTALL_DIR})
292 install(FILES scripting/plasmoids.knsrc DESTINATION  ${CONFIG_INSTALL_DIR})