Debian Codegraph @

CMakeLists.txt

raw ◀ ▶
Source reconstructed at patch state 0 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 ########### requirements ###############
2
3 cmake_minimum_required (VERSION 2.6)
4 find_package (PkgConfig)
5 include (CheckLibraryExists)
6 include (CheckIncludeFiles)
7 include (CheckFunctionExists)
8 include (CheckSymbolExists)
9 include ("${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/GNUInstallDirs.cmake")
10
11 ########### project ###############
12
13 project ("cairo-dock-plugins")
14 set (VERSION "3.5.1")
15
16 add_definitions (-std=gnu99 -Wall -Werror-implicit-function-declaration) # -Wextra -Wwrite-strings -Wuninitialized -Werror-implicit-function-declaration -Wstrict-prototypes -Wreturn-type -Wparentheses -Warray-bounds)
17 if (NOT DEFINED CMAKE_BUILD_TYPE)
18 add_definitions (-O3)
19 endif()
20 add_definitions (-DGL_GLEXT_PROTOTYPES="1")
21
22 ############ sources tarball #############
23
24 set (CPACK_SOURCE_GENERATOR "TGZ")
25 set (CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}")
26 set (CPACK_SOURCE_IGNORE_FILES
27 "/build/;/.bzr/;/.bzrignore$;/.git/;/.gitignore$;/misc/;~$;${CPACK_SOURCE_IGNORE_FILES}")
28 include (CPack)
29
30 add_custom_target(dist
31 COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
32 add_custom_target(dist-bzr
33 COMMAND bzr export ${CMAKE_PROJECT_NAME}-${VERSION}.tar.gz
34 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
35
36 ############ uninstall #############
37
38 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake IMMEDIATE @ONLY)
39 add_custom_target (uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
40
41 ########### global variables ###############
42
43 if( WIN32 )
44 message(FATAL_ERROR "Cairo-Dock requires an air-conditioned room. Please close Windows!")
45 endif( WIN32 )
46
47 set (PACKAGE ${CMAKE_PROJECT_NAME})
48 set (GETTEXT_PACKAGE ${PACKAGE})
49
50 if ("${PACKAGEMENT}" STREQUAL "") ## do not check if we're using the same version when packaging the application (e.g. if we just want to generate a tarball of a previous version)
51 # we need GLDI which contains most global var: check it now to avoid many errors with regex
52 pkg_check_modules (GLDI REQUIRED gldi=${VERSION})
53 if (NOT GLDI_FOUND)
54 execute_process(
55 COMMAND pkg-config --modversion gldi # 2.2.0-3
56 OUTPUT_VARIABLE dock_version)
57 if (NOT "${PACKAGEMENT}" STREQUAL "")
58 STRING (REGEX REPLACE "\n" "" dock_version ${dock_version})
59 endif ()
60 MESSAGE (FATAL_ERROR "Error: version mismatch with the core: ${VERSION} <> ${dock_version}")
61 endif ()
62 endif ()
63
64 set (dock_version ${VERSION}) # should be the same except if PACKAGEMENT is set
65
66 # get plug-ins install dir
67 execute_process(
68 COMMAND pkg-config gldi --variable=pluginsdir # /usr/lib/cairo-dock # or /usr/lib/x86_64-linux-gnu/cairo-dock
69 OUTPUT_VARIABLE pluginsdir)
70 STRING (REGEX REPLACE "\n" "" pluginsdir ${pluginsdir}) # remove the \n
71 # get plug-ins data dir
72 execute_process(
73 COMMAND pkg-config gldi --variable=pluginsdatadir # /usr/share/cairo-dock/plug-ins
74 OUTPUT_VARIABLE pluginsdatadir)
75 STRING (REGEX REPLACE "\n" "" pluginsdatadir ${pluginsdatadir})
76 # get prefix dir
77 execute_process(
78 COMMAND pkg-config gldi --variable=prefix # /usr/share/cairo-dock/plug-ins
79 OUTPUT_VARIABLE prefix)
80 STRING (REGEX REPLACE "\n" "" prefix ${prefix})
81 # get GTK version (must be the same as the core, as GTK2 and GTK3 can't coexist at runtime)
82 execute_process(
83 COMMAND pkg-config gldi --variable=gtkversion # 2 or 3
84 OUTPUT_VARIABLE gtkversion)
85 STRING (REGEX REPLACE "\n" "" gtkversion ${gtkversion})
86
87 # check that installation dir matches with the core
88 GET_FILENAME_COMPONENT(libdir "${pluginsdir}/.." ABSOLUTE) # /usr/lib # or /usr/lib/x86_64-linux-gnu
89 GET_FILENAME_COMPONENT(pkgdatadir "${pluginsdatadir}/.." ABSOLUTE) # /usr/share/cairo-dock
90 GET_FILENAME_COMPONENT(datadir "${pluginsdatadir}/../.." ABSOLUTE) # /usr/share
91 if (NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "${prefix}"
92 OR NOT "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" STREQUAL "${libdir}"
93 OR NOT "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}" STREQUAL "${datadir}")
94 message (STATUS "It seems that the current CMAKE_INSTALL_{PREFIX,LIBDIR,DATAROOTDIR} flags are not the same that you have used with the core.")
95 message (STATUS " It will be replaced by this value: ${prefix}")
96 message (WARNING "Plug-ins should be installed in the same directory as the core, that is to say in ${pluginsdir}")
97 set (CMAKE_INSTALL_PREFIX "${prefix}")
98 #set (libdir "${CMAKE_INSTALL_PREFIX}/${libname}/cairo-dock")
99 endif()
100
101 # set internationalisation
102 set (GETTEXT_PLUGINS "cairo-dock-plugins")
103 set (localedir "${prefix}/${CMAKE_INSTALL_LOCALEDIR}")
104 set (gaugesdir "${datadir}/cairo-dock/gauges")
105
106 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/") # additionnal FindPackage files
107
108 set (MODULES_MISSING "")
109 set (MODULES_INTEGRATION_MISSING "")
110 set (PROGRAMS_MISSING "")
111
112
113 ########### Misc ###############
114 macro (enable_if_not_defined MODULE1)
115 if (NOT DEFINED ${MODULE1}) # true if not defined
116 set (${MODULE1} TRUE)
117 endif ()
118 endmacro (enable_if_not_defined)
119
120
121 ########## Config ###############
122
123 enable_if_not_defined (force-icon-in-menus)
124 if (force-icon-in-menus) # we believe that not showing icons in the menus by default is a terrible idea; unfortunately, it's not easily undoable for an end-user; so until this is fixed by a big player (Gnome, Ubuntu or other), we'll force the display, unless "-Dforce-icon-in-menus=yes" is provided in the cmake command.
125 add_definitions (-DCAIRO_DOCK_FORCE_ICON_IN_MENUS=1)
126 else()
127 add_definitions (-DCAIRO_DOCK_FORCE_ICON_IN_MENUS=0)
128 endif()
129
130
131 ########### dependancies ###############
132
133 message ("")
134 message (STATUS "=====================")
135 message (STATUS "Check dependencies...")
136 message (STATUS "=====================")
137 message ("")
138
139 pkg_check_modules ("PACKAGE" REQUIRED "gldi") # we check first the common libs that most plug-ins would need: basically, all the libs used by the core.
140 STRING (REGEX REPLACE "gldi;" "" PACKAGE_LIBRARIES "${PACKAGE_LIBRARIES}") # but we don't want to link to gldi, since we are dl-opened by it.
141
142 # add_definitions (-DGTK_DISABLE_DEPRECATED="1")
143
144 ############# GLIB #################
145 pkg_check_modules (GLIB glib-2.0)
146 STRING (REGEX REPLACE "\\..*" "" GLIB_MAJOR "${GLIB_VERSION}") # 2.28.3 => 2
147 STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" GLIB_MINOR "${GLIB_VERSION}") # 2.28.3 => 2.28
148 STRING (REGEX REPLACE "\\.[0-9]*" "" GLIB_MINOR "${GLIB_MINOR}") # 2.28 => 28
149 STRING (REGEX REPLACE ".*\\." "" GLIB_NANO "${GLIB_VERSION}") # 2.28.3 => 3
150 STRING (REGEX REPLACE "-.*" "" GLIB_NANO "${GLIB_NANO}")
151
152 ############# SHARED-FILES #################
153 set (shared_filesdatadir "${pluginsdatadir}/shared-files")
154 add_subdirectory (shared-files)
155
156
157
158 ################################################################################
159 # STATIC LIBS AND DEPENDENCES USED BY MORE THAN ONE PLUG-IN #
160 ################################################################################
161
162
163
164 ############# STATIC LIBRARIES ################
165 message (STATUS "> Static Libraries:")
166
167 ############# GVFS-INTEGRATION ################
168 message (STATUS "> GVFS-Integration:")
169 pkg_check_modules ("LIBGIO" "gio-2.0") ## GIO is used by a few applets: do not offer the possibility to not disable it
170 add_subdirectory (gvfs-integration)
171
172 ############# INDICATOR-APPLET #################
173 message (STATUS "> Indicator-Applet:")
174 enable_if_not_defined (enable-dbusmenu-support)
175 if (enable-dbusmenu-support)
176 # Note: the names of dbusmenu-glib, dbusmenu-gtk and indicator have changed...
177 ## DBusMenu Glib
178 set (DBUSMENU_MODULE dbusmenu-glib-0.4)
179 pkg_check_modules (DBUSMENU ${DBUSMENU_MODULE})
180 if (NOT DBUSMENU_FOUND)
181 set (DBUSMENU_MODULE dbusmenu-glib)
182 pkg_check_modules (DBUSMENU ${DBUSMENU_MODULE})
183 set (INDICATOR_APPLICATIONADDED_HAS_HINT 0) # doesn't have 'hint' with old version
184 else ()
185 set (INDICATOR_APPLICATIONADDED_HAS_HINT 1) # now the ApplicationAdded signal (Status-Notifier) has a new parameter (hint) => https://code.launchpad.net/~ted/indicator-application/name-hints/+merge/67213
186 endif()
187
188 ## DBusMenu Gtk
189 set (DBUSMENU_GTK_MODULE dbusmenu-gtk3-0.4)
190 pkg_check_modules (DBUSMENU_GTK ${DBUSMENU_GTK_MODULE})
191 if (NOT DBUSMENU_GTK_FOUND)
192 set (DBUSMENU_GTK_MODULE dbusmenu-gtk3)
193 pkg_check_modules (DBUSMENU_GTK ${DBUSMENU_GTK_MODULE})
194 endif()
195 endif()
196
197 ## Indicator
198 enable_if_not_defined (enable-indicator-support)
199 if (enable-indicator-support)
200 set (INDICATOR_APPLET_MODULE ayatana-indicator3-0.4)
201 pkg_check_modules (INDICATOR_APPLET ${INDICATOR_APPLET_MODULE})
202 endif()
203
204 ## libido
205 enable_if_not_defined (enable-libido-support)
206 if (enable-libido-support)
207 set (IDO_MODULE libayatana-ido3-0.4)
208 pkg_check_modules (IDO ${IDO_MODULE})
209 endif()
210
211 ## Extract versions of DBusMenu
212 if (DBUSMENU_FOUND AND DBUSMENU_GTK_FOUND)
213 STRING (REGEX REPLACE "\\..*" "" DBUSMENU_MAJOR "${DBUSMENU_VERSION}")
214 STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" DBUSMENU_MINOR "${DBUSMENU_VERSION}") # 0.1.7 => 1.7
215 STRING (REGEX REPLACE "\\.[0-9]*" "" DBUSMENU_MINOR "${DBUSMENU_MINOR}")
216 STRING (REGEX REPLACE ".*\\." "" DBUSMENU_NANO "${DBUSMENU_VERSION}")
217 STRING (REGEX REPLACE "-.*" "" DBUSMENU_NANO "${DBUSMENU_NANO}")
218
219 STRING (REGEX REPLACE "\\..*" "" DBUSMENU_GTK_MAJOR "${DBUSMENU_GTK_VERSION}")
220 STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" DBUSMENU_GTK_MINOR "${DBUSMENU_GTK_VERSION}") # 0.1.7 => 1.7
221 STRING (REGEX REPLACE "\\.[0-9]*" "" DBUSMENU_GTK_MINOR "${DBUSMENU_GTK_MINOR}")
222 STRING (REGEX REPLACE ".*\\." "" DBUSMENU_GTK_NANO "${DBUSMENU_GTK_VERSION}")
223 STRING (REGEX REPLACE "-.*" "" DBUSMENU_GTK_NANO "${DBUSMENU_GTK_NANO}")
224
225 if (${DBUSMENU_GTK_MAJOR} GREATER 0 OR ${DBUSMENU_GTK_MINOR} GREATER 5
226 OR (${DBUSMENU_GTK_MINOR} EQUAL 5 AND ${DBUSMENU_GTK_NANO} GREATER 89))
227 set (INDICATOR_APPLICATIONADDED_HAS_TITLE 1) # Status-Notifier: new parameter "Title" in the "added" signal since Precise
228 else()
229 set (INDICATOR_APPLICATIONADDED_HAS_TITLE 0)
230 endif()
231 endif()
232
233 ## Extract version of indicator
234 if (INDICATOR_APPLET_FOUND)
235 STRING (REGEX REPLACE "\\..*" "" INDICATOR_MAJOR "${INDICATOR_APPLET_VERSION}")
236 STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" INDICATOR_MINOR "${INDICATOR_APPLET_VERSION}") # 0.1.7 => 1.7
237 STRING (REGEX REPLACE "\\.[0-9]*" "" INDICATOR_MINOR "${INDICATOR_MINOR}")
238 STRING (REGEX REPLACE ".*\\." "" INDICATOR_NANO "${INDICATOR_APPLET_VERSION}")
239 STRING (REGEX REPLACE "-.*" "" INDICATOR_NANO "${INDICATOR_NANO}")
240
241 if (${INDICATOR_MAJOR} GREATER 0 OR ${INDICATOR_MINOR} GREATER 4
242 OR (${INDICATOR_MINOR} EQUAL 4 AND ${INDICATOR_NANO} GREATER 89))
243 set (SOUND_SERVICE_VERSION 1) # Sound-Menu: new DBus path
244 set (INDICATOR_MESSAGES_HAS_LOZENGE 1) # Messaging Menu has 'right-is-lozenge'
245 else() # older than Precise.
246 set (SOUND_SERVICE_VERSION 0)
247 set (INDICATOR_MESSAGES_HAS_LOZENGE 0)
248 endif()
249
250 execute_process(
251 COMMAND pkg-config --variable=iconsdir ayatana-indicator3-0.4
252 OUTPUT_VARIABLE INDICATORICONSDIR)
253 execute_process(
254 COMMAND pkg-config --variable=indicatordir ayatana-indicator3-0.4
255 OUTPUT_VARIABLE INDICATORDIR)
256 STRING (REGEX REPLACE "\n" "" INDICATORDIR ${INDICATORDIR})
257 set (with_indicator3 yes)
258 message (STATUS " Indicators: with Indicator3 support")
259
260 STRING (REGEX REPLACE "\n" "" INDICATORICONSDIR "${INDICATORICONSDIR}") # la commande rajoute un retour chariot ...
261 if (with_indicator3)
262 add_subdirectory (Indicator-applet3)
263 endif()
264 ## DBusMenu is needed for Indicator-applet
265 if (DBUSMENU_FOUND AND DBUSMENU_GTK_FOUND)
266 add_subdirectory (Indicator-applet)
267 set (with_indicator "yes")
268 endif()
269 endif()
270
271 if (NOT DBUSMENU_FOUND OR NOT DBUSMENU_GTK_FOUND OR NOT INDICATOR_APPLET_FOUND)
272 message (WARNING "These modules are required to compile Indicators applet (Messaging-Menu, Sound-Control, Status-Notifier and Global-Menu): ${INDICATOR_APPLET_MODULE}(-0.4), ${IDO_MODULE}, ${DBUSMENU_MODULE}(-0.4), ${DBUSMENU_GTK_MODULE}(-0.4)")
273 set (MODULES_MISSING "${MODULES_MISSING} ${INDICATOR_APPLET_MODULE}(-0.4) (${IDO_MODULE}) ${DBUSMENU_MODULE}(-0.4) ${DBUSMENU_GTK_MODULE}(-0.4)")
274 endif()
275
276 ############# UPOWER #####################
277 message (STATUS "> UPower:")
278 enable_if_not_defined (enable-upower-support)
279 if (enable-upower-support)
280 pkg_check_modules (UPOWER upower-glib) # useful for Powermanager too.
281 endif()
282 if (UPOWER_FOUND)
283 set (with_upower_support yes)
284 STRING (REGEX REPLACE "\\..*" "" UPOWER_MAJOR "${UPOWER_VERSION}") # 2.28.3 => 2
285 STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" UPOWER_MINOR "${UPOWER_VERSION}") # 2.28.3 => 2.28
286 STRING (REGEX REPLACE "\\.[0-9]*" "" UPOWER_MINOR "${UPOWER_MINOR}") # 2.28 => 28
287 if (${UPOWER_MAJOR} GREATER 0 OR ${UPOWER_MINOR} GREATER 89)
288 message (STATUS " Your version of UPower no longer supports suspend/hibernate features")
289 set (with_upower_support "yes (0.99+)")
290 else()
291 set (UPOWER_SUPPORTS_SUSPEND_HIBERNATE 1)
292 endif()
293 else()
294 set (with_upower_support no)
295 message (STATUS "Could not find upower-glib; Logout and PowerManager plugin won't be built with UPower support.")
296 message (WARNING "This module is required to compile LogOut and PowerManager applet with UPower support: upower-glib")
297 set (MODULES_MISSING "${MODULES_MISSING} upower-glib")
298 endif()
299
300 ############# DISTRIBUTION #################
301 message (STATUS "> Distribution:")
302 # We try to detect if the user is on Ubuntu to know which bus we have to use...
303 execute_process(
304 COMMAND lsb_release -i
305 OUTPUT_VARIABLE DISTRO_ID) # -> "Distributor ID: Ubuntu"
306 if (NOT "${DISTRO_ID}" STREQUAL "") # this tool isn't available on all distributions
307 STRING (REGEX REPLACE "\n" "" DISTRO_ID ${DISTRO_ID}) # retour chariot
308 STRING (REGEX REPLACE ".*: *\t*" "" DISTRO_ID ${DISTRO_ID})
309
310 execute_process(
311 COMMAND lsb_release -r
312 OUTPUT_VARIABLE DISTRO_RELEASE) # -> "Release: 10.10"
313 STRING (REGEX REPLACE "\n" "" DISTRO_RELEASE ${DISTRO_RELEASE}) # retour chariot
314 STRING (REGEX REPLACE ".*: *\t*" "" DISTRO_RELEASE ${DISTRO_RELEASE})
315 else()
316 # on Ubuntu deb builders, lsb_release isn't available but we can have a look to /etc/issue.net
317 get_filename_component(ISSUE_NET "/etc/issue.net" ABSOLUTE)
318 if (EXISTS ${ISSUE_NET}) # to not have an error with cat
319 execute_process(
320 COMMAND cat ${ISSUE_NET}
321 OUTPUT_VARIABLE DISTRO_RELEASE) # -> Ubuntu 10.10 || Ubuntu natty (development branch)
322 if (NOT "${DISTRO_RELEASE}" STREQUAL "")
323 STRING (REGEX REPLACE "\n" "" DISTRO_RELEASE ${DISTRO_RELEASE}) # retour chariot
324 STRING (REGEX REPLACE " (.+)" "" DISTRO_ID ${DISTRO_RELEASE})
325 if ("${DISTRO_ID}" STREQUAL "Ubuntu")
326 STRING (REGEX REPLACE ".[(]development branch[)]" "" DISTRO_RELEASE ${DISTRO_RELEASE})
327 STRING (REGEX REPLACE ".LTS" "" DISTRO_RELEASE ${DISTRO_RELEASE}) # Ubuntu 10.04.1 LTS
328 STRING (REGEX REPLACE "(.+) " "" DISTRO_RELEASE ${DISTRO_RELEASE})
329 if ("${DISTRO_RELEASE}" STREQUAL "natty")
330 set (DISTRO_RELEASE "11.04")
331 elseif ("${DISTRO_RELEASE}" STREQUAL "oneiric")
332 set (DISTRO_RELEASE "11.10")
333 elseif ("${DISTRO_RELEASE}" STREQUAL "precise")
334 set (DISTRO_RELEASE "12.04")
335 endif()
336 endif()
337 endif()
338 endif()
339 endif()
340
341 if (NOT "${DISTRO_ID}" STREQUAL "")
342 message (STATUS " DISTRO_ID: ${DISTRO_ID}, DISTRO_RELEASE: ${DISTRO_RELEASE}")
343 endif()
344
345 GET_FILENAME_COMPONENT(DEBIAN_VERSION /etc/debian_version ABSOLUTE)
346 if (EXISTS ${DEBIAN_VERSION})
347 set (DEBIAN_PKG_MANAGERS "/usr/bin/apt-get /usr/bin/dpkg /usr/bin/aptitude")
348 endif()
349
350
351
352 ################################################################################
353 # PLUG-INS #
354 ################################################################################
355
356
357
358 ############# SHARED LIBRARIES ###########
359 message (STATUS "> Shared Libraries:")
360
361 ############# ALSA_MIXER #################
362 message (STATUS "> AlsaMixer:")
363 set (with_alsa no)
364 set (with_soundmenu no)
365 enable_if_not_defined (enable-alsa-mixer)
366 if (enable-alsa-mixer)
367 pkg_check_modules (ALSA_MIXER_PACKAGE alsa)
368 if (NOT ALSA_MIXER_PACKAGE_FOUND)
369 message (STATUS "Could not find alsa; Cairo-Dock won't be built with AlsaMixer applet.")
370 message (WARNING "This module is required to compile AlsaMixer applet: alsa")
371 set (MODULES_MISSING "${MODULES_MISSING} alsa")
372 else()
373 set (GETTEXT_ALSA_MIXER ${GETTEXT_PLUGINS})
374 set (VERSION_ALSA_MIXER "2.1.5")
375 set (PACKAGE_ALSA_MIXER "cd-AlsaMixer")
376 set (with_alsa yes)
377 set (alsa_mixerdatadir "${pluginsdatadir}/AlsaMixer")
378 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/alsaMixer/data/AlsaMixer.conf.in ${CMAKE_CURRENT_BINARY_DIR}/alsaMixer/data/AlsaMixer.conf)
379 if (with_indicator3)
380 set (INDICATOR_SOUNDMENU_WITH_IND3 TRUE)
381 set (with_soundmenu yes)
382 endif()
383 add_subdirectory ("alsaMixer")
384 endif()
385 endif()
386
387 ############# ANIMATED ICONS #################
388 message (STATUS "> Animated Icons:")
389 set (GETTEXT_ANIMATED_ICONS ${GETTEXT_PLUGINS})
390 set (VERSION_ANIMATED_ICONS "1.0.13")
391 set (PACKAGE_ANIMATED_ICONS "cd-Animated-icons")
392 set (animated_iconsdatadir "${pluginsdatadir}/Animated-icons")
393 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Animated-icons/data/Animated-icons.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Animated-icons/data/Animated-icons.conf)
394 add_subdirectory (Animated-icons)
395
396 ############# CAIRO_PENGUIN #################
397 message (STATUS "> Cairo Penguin:")
398 set (GETTEXT_CAIRO_PENGUIN ${GETTEXT_PLUGINS})
399 set (VERSION_CAIRO_PENGUIN "1.1.13")
400 set (PACKAGE_CAIRO_PENGUIN "cd-Cairo-Penguin")
401 set (cairo_penguinuserdirname "Cairo-Penguin")
402 set (cairo_penguindatadir "${pluginsdatadir}/Cairo-Penguin")
403 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Cairo-Penguin/data/Cairo-Penguin.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Cairo-Penguin/data/Cairo-Penguin.conf)
404 add_subdirectory (Cairo-Penguin)
405
406 ############# CLIPPER #################
407 message (STATUS "> Clipper:")
408 set (GETTEXT_CLIPPER ${GETTEXT_PLUGINS})
409 set (VERSION_CLIPPER "1.1.9")
410 set (PACKAGE_CLIPPER "cd-Clipper")
411 set (Clipperdatadir "${pluginsdatadir}/Clipper")
412 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Clipper/data/Clipper.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Clipper/data/Clipper.conf)
413 add_subdirectory (Clipper)
414
415 ############# CLOCK #################
416 message (STATUS "> Clock:")
417 enable_if_not_defined (enable-ical-support)
418 set (with_ical no)
419 if (enable-ical-support)
420 pkg_check_modules ("LIBICAL_PACKAGE" "libical")
421 if (NOT LIBICAL_PACKAGE_FOUND)
422 message (STATUS "Could not find libical; Clock plugin won't be built with iCal support.")
423 message (WARNING "This module is required to compile Clock applet with iCal support: libical")
424 set (MODULES_MISSING "${MODULES_MISSING} libical")
425 else ()
426 set (with_ical yes)
427 endif()
428 endif()
429 set (GETTEXT_CLOCK ${GETTEXT_PLUGINS})
430 set (VERSION_CLOCK "2.3.1")
431 set (PACKAGE_CLOCK "cd-clock")
432 set (clockuserdirname "clock")
433 set (clockdatadir "${pluginsdatadir}/clock")
434 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/clock/data/clock.conf.in ${CMAKE_CURRENT_BINARY_DIR}/clock/data/clock.conf)
435 add_subdirectory (clock)
436
437 ############# COMPOSITE_MANAGER #################
438 message (STATUS "> Composite Manager:")
439 set (GETTEXT_COMPOSITE_MANAGER ${GETTEXT_PLUGINS})
440 set (VERSION_COMPOSITE_MANAGER "1.0.4")
441 set (PACKAGE_COMPOSITE_MANAGER "cd-Composite-Manager")
442 set (composite_managerdatadir "${pluginsdatadir}/Composite-Manager")
443 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Composite-Manager/data/Composite-Manager.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Composite-Manager/data/Composite-Manager.conf)
444 add_subdirectory (Composite-Manager)
445
446 ############# DBUS #################
447 message (STATUS "> DBus:")
448 set (with_python no)
449 set (with_python2 no)
450 set (with_python3 no)
451 enable_if_not_defined (enable-python-interface)
452 if (enable-python-interface)
453 message (STATUS " * Python:")
454 # find python executables
455 find_program (PYTHON2_EXECUTABLE python2) # if both python2&3 are installed, usually we will have 'python2' and 'python3' available (one of them being a link to 'python')
456 if (PYTHON2_EXECUTABLE AND EXISTS ${PYTHON2_EXECUTABLE})
457 set (PYTHON2_FOUND TRUE)
458 set (with_python2 yes)
459 endif()
460 find_program (PYTHON3_EXECUTABLE python3)
461 if (PYTHON3_EXECUTABLE AND EXISTS ${PYTHON3_EXECUTABLE})
462 set (PYTHON3_FOUND TRUE)
463 set (with_python3 yes)
464 endif()
465 if (NOT PYTHON2_FOUND OR NOT PYTHON3_FOUND) # if we didn't find one of them,
466 find_program (PYTHON_EXECUTABLE python)
467 if (PYTHON_EXECUTABLE AND EXISTS ${PYTHON_EXECUTABLE})
468 EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c
469 "from __future__ import print_function; import sys; print(sys.version)"
470 OUTPUT_VARIABLE PYTHON_VERSION)
471 STRING (REGEX REPLACE "\\..*" "" PYTHON_VERSION ${PYTHON_VERSION})
472 message (STATUS " Python Version: ${PYTHON_VERSION}")
473 if ("${PYTHON_VERSION}" STREQUAL "2")
474 set (PYTHON2_EXECUTABLE ${PYTHON_EXECUTABLE})
475 set (PYTHON2_FOUND TRUE)
476 set (with_python2 yes)
477 elseif ("${PYTHON_VERSION}" STREQUAL "3")
478 set (PYTHON3_EXECUTABLE ${PYTHON_EXECUTABLE})
479 set (PYTHON3_FOUND TRUE)
480 set (with_python3 yes)
481 endif()
482 endif()
483 endif()
484
485 # see if we found anything
486 if (NOT PYTHON2_FOUND AND NOT PYTHON3_FOUND)
487 message (STATUS "Could not find Python, won't install Python interface.")
488 message (WARNING "This program is required to compile DBus applet with Python interface: python (version 2)")
489 set (PROGRAMS_MISSING "${PROGRAMS_MISSING} python")
490 else()
491 message (STATUS " Python executable program(s): ${PYTHON2_EXECUTABLE} ; ${PYTHON3_EXECUTABLE}")
492 if (EXISTS ${DEBIAN_VERSION})
493 message (STATUS " will use '--install-layout deb' with 'python setup.py install'")
494 set (DEBIAN_INSTALL_LAYOUT "--install-layout deb")
495 endif()
496 set (with_python yes)
497 endif()
498 endif()
499
500 enable_if_not_defined (enable-ruby-interface)
501 if (enable-ruby-interface)
502 message (STATUS " * Ruby:")
503 # find_package(Ruby) found libs of ruby-dev but we only need a directory where we can install ruby libs.
504 find_program (RUBY_EXECUTABLE ruby)
505 EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['vendordir']"
506 OUTPUT_VARIABLE RUBY_LIB_DIR)
507 message (STATUS " Ruby library dir: ${RUBY_LIB_DIR}")
508 if ("${RUBY_LIB_DIR}" STREQUAL "" OR "${RUBY_LIB_DIR}" STREQUAL "nil")
509 message (STATUS "Could not find ruby libs, won't install Ruby interface.")
510 message (WARNING "This program is required to compile DBus applet with Ruby interface: ruby")
511 set (PROGRAMS_MISSING "${PROGRAMS_MISSING} ruby")
512 set (with_ruby no)
513 else()
514 message (STATUS " will be installed in: ${RUBY_LIB_DIR}")
515 set (RUBY_FOUND "TRUE")
516 set (with_ruby yes)
517 endif()
518 endif()
519
520 set (with_mono no)
521 enable_if_not_defined (enable-mono-interface)
522 if (enable-mono-interface)
523 message (STATUS " * Mono:")
524 #find_package (Mono)
525 find_program (GMCS_EXECUTABLE mcs)
526 if (NOT GMCS_EXECUTABLE OR NOT EXISTS ${GMCS_EXECUTABLE})
527 message (STATUS "Could not find Mono compiler mcs, won't build Mono interface.")
528 else()
529 pkg_check_modules (MONO_PACKAGE dbus-sharp-2.0 dbus-sharp-glib-2.0 glib-sharp-2.0)
530 if (NOT MONO_PACKAGE_FOUND)
531 message (STATUS "Could not find dbus-sharp-2.0, dbus-sharp-glib-2.0 or glib-sharp-2.0; won't be built Mono interface.")
532 message (WARNING "These modules are required to compile DBus applet with Mono interface: dbus-sharp-2.0, dbus-sharp-glib-2.0 and glib-sharp-2.0")
533 set (MODULES_MISSING "${MODULES_MISSING} dbus-sharp-2.0 dbus-sharp-glib-2.0 glib-sharp-2.0")
534 else()
535 set (MONO_FOUND TRUE)
536 set (with_mono yes)
537 endif()
538 endif()
539 endif()
540
541 set (with_vala no)
542 set (with_valac no)
543 enable_if_not_defined (enable-vala-interface)
544 if (enable-vala-interface)
545 message (STATUS " * Vala:")
546 # Valac is only required to convert vala files to C files.
547 # So we can directly use produced files (c, h, vapi) without using valac.
548 set (with_vala yes)
549 set (with_valac no)
550 find_program (VALAC_EXE valac)
551 message (STATUS " Path to valac: ${VALAC_EXE}")
552 set (VERSION_VALA "1.0.0")
553 message (STATUS " Cairo-Dock Vala interface's ABI version: ${VERSION_VALA}")
554
555 enable_if_not_defined (enable-vala-support)
556 if (NOT enable-vala-support)
557 set (with_vala no)
558 # Glib < 2.26
559 elseif (${GLIB_MAJOR} LESS 3 AND ${GLIB_MINOR} LESS 26)
560 set (with_vala no)
561 elseif (VALAC_EXE AND EXISTS ${VALAC_EXE}) # now it works with 0.10 and 0.11 (= next 0.12) # $VALAC_EXE may be the correct path, even if valac is not installed !
562 execute_process(COMMAND ${VALAC_EXE} "--version"
563 OUTPUT_VARIABLE "VALA_VERSION")
564 string(REPLACE "Vala" "" "VALA_VERSION" ${VALA_VERSION})
565 string(STRIP ${VALA_VERSION} "VALA_VERSION")
566 message (STATUS " Vala version: ${VALA_VERSION}")
567
568 STRING (REGEX REPLACE "\\..*" "" VALA_MAJOR "${VALA_VERSION}")
569 # message (STATUS "VALA_MAJOR : ${VALA_MAJOR}")
570
571 STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" VALA_MINOR "${VALA_VERSION}") # 0.1.7 => 1.7
572 STRING (REGEX REPLACE "\\.[0-9]*" "" VALA_MINOR "${VALA_MINOR}")
573 # message (STATUS "VALA_MINOR : ${VALA_MINOR}")
574
575 STRING (REGEX REPLACE ".*\\." "" VALA_NANO "${VALA_VERSION}")
576 STRING (REGEX REPLACE "-.*" "" VALA_NANO "${VALA_NANO}")
577 # message (STATUS "VALA_NANO : ${VALA_NANO}")
578
579 if (${VALA_MAJOR} GREATER 0 OR ${VALA_MINOR} GREATER 9) # vala >= 0.10
580 # AND (${VALA_MAJOR} LESS 1 AND ${VALA_MINOR} LESS 13)) # and <= 0.12
581 message (STATUS " Vala compiler OK (>= 0.10).")# and <= 0.12).")
582 set (VALAC_FOUND TRUE)
583 set (with_valac yes)
584 else()
585 message (STATUS " Vala compiler is too old (0.10 required) or too new (> 0.12), won't build Vala interface.")
586 endif()
587 else()
588 message (STATUS "Could not find ValaC, won't build Vala interface with the version of your distribution.")
589 message (WARNING "This program is required to compile DBus applet with Vala interface: valac (version > 0.10)")
590 set (PROGRAMS_MISSING "${PROGRAMS_MISSING} valac")
591 endif()
592 endif()
593
594
595 set (GETTEXT_DBUS ${GETTEXT_PLUGINS})
596 set (VERSION_DBUS "1.2.3")
597 set (PACKAGE_DBUS "cd-Dbus")
598 set (dbusdatadir "${pluginsdatadir}/Dbus")
599 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Dbus/data/Dbus.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Dbus/data/Dbus.conf)
600 add_subdirectory (Dbus)
601
602 ############# DESKLET_RENDERING #################
603 message (STATUS "> Desklet Rendering:")
604 set (GETTEXT_DESKLET_RENDERING ${GETTEXT_PLUGINS})
605 set (VERSION_DESKLET_RENDERING "1.5.8")
606 set (PACKAGE_DESKLET_RENDERING "cd-desklet-rendering")
607 set (desklet_renderingdatadir "${pluginsdatadir}/desklet-rendering")
608 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/desklet-rendering/data/desklet-rendering.conf.in ${CMAKE_CURRENT_BINARY_DIR}/desklet-rendering/data/desklet-rendering.conf)
609 add_subdirectory (desklet-rendering)
610
611 ############# DIALOG_RENDERING #################
612 message (STATUS "> Dialog Rendering:")
613 set (GETTEXT_DIALOG_RENDERING ${GETTEXT_PLUGINS})
614 set (VERSION_DIALOG_RENDERING "0.6.1")
615 set (PACKAGE_DIALOG_RENDERING "cd-dialog-rendering")
616 set (dialog_renderingdatadir "${pluginsdatadir}/dialog-rendering")
617 add_subdirectory (dialog-rendering)
618
619 ############# DISKS #################
620 set (with_disks no) # unstable
621 if (enable-disks)
622 message (STATUS "> Disks:")
623 set (GETTEXT_DISKS ${GETTEXT_PLUGINS})
624 set (VERSION_DISKS "0.0.7")
625 set (PACKAGE_DISKS "cd-disks")
626 set (with_disks yes)
627 set (disksdatadir "${pluginsdatadir}/Disks")
628 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Disks/data/Disks.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Disks/data/Disks.conf)
629 add_subdirectory ("Disks")
630 endif()
631
632 ############# DND2SHARE #################
633 message (STATUS "> DND2Share:")
634 set (GETTEXT_DND2SHARE ${GETTEXT_PLUGINS})
635 set (VERSION_DND2SHARE "1.0.12")
636 set (PACKAGE_DND2SHARE "cd-dnd2share")
637 set (dnd2sharedatadir "${pluginsdatadir}/dnd2share")
638 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/dnd2share/data/dnd2share.conf.in ${CMAKE_CURRENT_BINARY_DIR}/dnd2share/data/dnd2share.conf)
639 add_subdirectory (dnd2share)
640
641 ############# DOCK RENDERING #################
642 message (STATUS "> Dock Rendering:")
643 set (GETTEXT_RENDERING ${GETTEXT_PLUGINS})
644 set (VERSION_RENDERING "1.5.11")
645 set (PACKAGE_RENDERING "cd-rendering")
646 set (renderingdatadir "${pluginsdatadir}/rendering")
647 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/dock-rendering/data/rendering.conf.in ${CMAKE_CURRENT_BINARY_DIR}/dock-rendering/data/rendering.conf)
648 add_subdirectory (dock-rendering)
649
650 ############# DONCKY #################
651 set (with_doncky no) # unstable
652 if (enable-doncky)
653 message (STATUS "> Doncky:")
654 set (GETTEXT_DONCKY ${GETTEXT_PLUGINS})
655 set (VERSION_DONCKY "0.0.9")
656 set (PACKAGE_DONCKY "cd-doncky")
657 set (with_doncky yes)
658 set (donckydatadir "${pluginsdatadir}/Doncky")
659 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Doncky/data/Doncky.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Doncky/data/Doncky.conf)
660 add_subdirectory (Doncky)
661 endif()
662
663 ############# DROP INDICATOR #################
664 message (STATUS "> Drop Indicator:")
665 set (GETTEXT_DROP_INDICATOR ${GETTEXT_PLUGINS})
666 set (VERSION_DROP_INDICATOR "1.1.7")
667 set (PACKAGE_DROP_INDICATOR "cd-drop_indicator")
668 set (drop_indicatordatadir "${pluginsdatadir}/drop-indicator")
669 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/drop-indicator/data/drop_indicator.conf.in ${CMAKE_CURRENT_BINARY_DIR}/drop-indicator/data/drop_indicator.conf)
670 add_subdirectory (drop-indicator)
671
672 ############# DUSTBIN #################
673 message (STATUS "> Dustbin:")
674 set (GETTEXT_DUSTBIN ${GETTEXT_PLUGINS})
675 set (VERSION_DUSTBIN "2.3.6")
676 set (PACKAGE_DUSTBIN "cd-dustbin")
677 set (dustbinuserdirname "dustbin")
678 set (dustbindatadir "${pluginsdatadir}/dustbin")
679 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/dustbin/data/dustbin.conf.in ${CMAKE_CURRENT_BINARY_DIR}/dustbin/data/dustbin.conf)
680 add_subdirectory (dustbin)
681
682 ############# FOLDERS #################
683 message (STATUS "> Folders:")
684 set (GETTEXT_FOLDERS ${GETTEXT_PLUGINS})
685 set (VERSION_FOLDERS "0.2.6")
686 set (PACKAGE_FOLDERS "cd-Folders")
687 set (foldersdatadir "${pluginsdatadir}/Folders")
688 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Folders/data/Folders.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Folders/data/Folders.conf)
689 add_subdirectory (Folders)
690
691 ############# GLOBAL-MENU #################
692 set (with_global_menu no) # unstable
693 if (enable-global-menu AND DBUSMENU_FOUND AND DBUSMENU_GTK_FOUND) # currently only supported with new name of the indicator module and with newer version of dbusmenu
694 message (STATUS "> Global-Menu:")
695 set (GETTEXT_GLOBAL_MENU ${GETTEXT_PLUGINS})
696 set (VERSION_GLOBAL_MENU "0.1.3")
697 set (PACKAGE_GLOBAL_MENU "cd-Global-Menu")
698 set (with_global_menu yes)
699 set (global_menudatadir "${pluginsdatadir}/Global-Menu")
700 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Global-Menu/data/Global-Menu.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Global-Menu/data/Global-Menu.conf)
701 add_subdirectory (Global-Menu)
702 endif()
703
704 ############# GMENU #################
705 message (STATUS "> GMenu:")
706 set (with_gmenu no)
707 enable_if_not_defined (enable-gmenu)
708 if (enable-gmenu)
709 set (GMENU_MODULE "libgnome-menu-3.0")
710 pkg_check_modules (GMENU_PACKAGE ${GMENU_MODULE})
711 if (NOT GMENU_PACKAGE_FOUND)
712 message (STATUS "Could not find ${GMENU_MODULE}; Cairo-Dock won't be built with GMenu applet.")
713 message (WARNING "This module is required to compile GMenu applet: ${GMENU_MODULE}")
714 set (MODULES_MISSING "${MODULES_MISSING} ${GMENU_MODULE}")
715 else()
716 set (GETTEXT_GMENU ${GETTEXT_PLUGINS})
717 set (VERSION_GMENU "2.0.1")
718 set (with_gmenu "yes")
719 set (PACKAGE_GMENU "cd-GMenu")
720 set (gmenudatadir "${pluginsdatadir}/GMenu")
721 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/GMenu/data/GMenu.conf.in ${CMAKE_CURRENT_BINARY_DIR}/GMenu/data/GMenu.conf)
722 add_subdirectory ("GMenu")
723 endif()
724 endif()
725
726 ############# GNOME-INTEGRATION #################
727 message (STATUS "> Gnome-Integration:")
728 set (with_gnome_integration no)
729 enable_if_not_defined (enable-gnome-integration)
730 if (enable-gnome-integration)
731 pkg_check_modules (GNOME_INTEGRATION gio-2.0)
732 if (NOT GNOME_INTEGRATION_FOUND)
733 message (STATUS "Could not find gio; Cairo-Dock won't be built with Gnome>=2.22 support.")
734 message (STATUS "This module is required to compile Gnome-Integration applet: gio-2.0")
735 set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} gio-2.0")
736 else()
737 set (GETTEXT_GNOME_INTEGRATION ${GETTEXT_PLUGINS})
738 set (VERSION_GNOME_INTEGRATION "1.0.5")
739 set (PACKAGE_GNOME_INTEGRATION "cd_gnome-integration")
740 set (with_gnome_integration yes)
741 set (gnome_integrationdatadir "${pluginsdatadir}/gnome-integration")
742 add_subdirectory ("gnome-integration")
743 endif()
744 endif()
745
746 ############# GNOME-INTEGRATION-OLD #################
747 set (with_gnome_integration_old no) # deprecated
748 if (enable-old-gnome-integration)
749 message (STATUS "> Gnome-Integration:")
750 message (WARNING "This applet is deprecated")
751 pkg_check_modules (OLD_GNOME_INTEGRATION gnome-vfs-2.0 libgnomeui-2.0)
752 if (NOT OLD_GNOME_INTEGRATION_FOUND)
753 message (STATUS "Could not find gnome-vfs and/or gnomeui; Cairo-Dock won't be built with Gnome<2.22 support.")
754 message (STATUS "These modules are required to compile Gnome-Integration-Old applet: gnome-vfs-2.0 libgnomeui-2.0")
755 set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} gnome-vfs-2.0 libgnomeui-2.0")
756 else()
757 set (GETTEXT_GNOME_INTEGRATION_OLD ${GETTEXT_PLUGINS})
758 set (VERSION_GNOME_INTEGRATION_OLD "1.0.6")
759 set (PACKAGE_GNOME_INTEGRATION_OLD "cd_gnome-integration-old")
760 set (with_gnome_integration_old yes)
761 set (gnome_integration_olddatadir "${pluginsdatadir}/gnome-integration-old")
762 add_subdirectory ("gnome-integration-old")
763 endif()
764 endif()
765
766 ############# ICON EFFECTS #################
767 message (STATUS "> Icon Effects:")
768 set (GETTEXT_ICON_EFFECTS ${GETTEXT_PLUGINS})
769 set (VERSION_ICON_EFFECTS "1.2.6")
770 set (PACKAGE_ICON_EFFECTS "cd-icon-effect")
771 set (icon_effectsdatadir "${pluginsdatadir}/icon-effect")
772 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/icon-effect/data/icon-effect.conf.in ${CMAKE_CURRENT_BINARY_DIR}/icon-effect/data/icon-effect.conf)
773 add_subdirectory (icon-effect)
774
775 ############# IMPULSE #################
776 set (with_impulse no)
777 message (STATUS "> Impulse:")
778 enable_if_not_defined (enable-impulse)
779 if (enable-impulse)
780 pkg_check_modules (LIBPULSE libpulse)
781 pkg_check_modules (FFTW3 fftw3) # optional, not advised for distributions packages (it's not a small dependence...)
782 if (NOT LIBPULSE_FOUND)
783 message (STATUS "Could not find libpulse; Cairo-Dock won't be built with Impulse applet.")
784 message (WARNING "These modules are required to compile Impulse applet: libpulse (and fftw3 - optional)")
785 set (MODULES_MISSING "${MODULES_MISSING} libpulse")
786 else()
787 set (GETTEXT_IMPULSE ${GETTEXT_PLUGINS})
788 set (VERSION_IMPULSE "0.0.7")
789 set (PACKAGE_IMPULSE "cd-Impulse")
790 set (with_impulse yes)
791 set (impulsedatadir "${pluginsdatadir}/Impulse")
792 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Impulse/data/Impulse.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Impulse/data/Impulse.conf)
793 add_subdirectory (Impulse)
794 endif()
795 endif()
796
797 ############# INDICATOR_GENERIC #################
798 set (with_indicator_generic no)
799 if (with_indicator3)
800 message (STATUS "> Indicator-Generic:")
801 set (GETTEXT_INDICATOR_GENERIC ${GETTEXT_PLUGINS})
802 set (VERSION_INDICATOR_GENERIC "0.0.2")
803 set (PACKAGE_INDICATOR_GENERIC "cd-Indicator-Generic")
804 set (with_indicator_generic yes)
805 set (indicator_genericdatadir "${pluginsdatadir}/Indicator-Generic")
806 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Indicator-Generic/data/Indicator-Generic.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Indicator-Generic/data/Indicator-Generic.conf)
807 add_subdirectory (Indicator-Generic)
808 endif()
809
810 ############# ILLUSION #################
811 message (STATUS "> Illusion:")
812 set (GETTEXT_ILLUSION ${GETTEXT_PLUGINS})
813 set (VERSION_ILLUSION "1.0.9")
814 set (PACKAGE_ILLUSION "cd-illusion")
815 set (illusiondatadir "${pluginsdatadir}/illusion")
816 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/illusion/data/illusion.conf.in ${CMAKE_CURRENT_BINARY_DIR}/illusion/data/illusion.conf)
817 add_subdirectory (illusion)
818
819 ############# KDE-INTEGRATION #################
820 message (STATUS "> KDE-Integration:")
821 set (with_kde_integration no)
822 enable_if_not_defined (enable-kde-integration)
823 set (with_kde_integration2 no) # highly unstable
824 if (enable-kde-integration2)
825 #find_package(KDE4)
826 find_package(Qt4)
827 if (QT4_FOUND)
828 message (STATUS " * Qt Includes: ${QT_INCLUDES}")
829 message (STATUS " * Qt Definitions: ${QT_DEFINITIONS}")
830 message (STATUS " * QtCore Library: ${QT_QTCORE_LIBRARY} / ${PACKAGE_LIBRARIES}")
831 else()
832 message (STATUS " * Qt unavailable")
833 endif()
834
835 find_path(KDECORE_INCLUDE_DIR "kdecore_export.h")
836 find_library(KDECORE_LIBRARY NAMES "kdecore")
837 GET_FILENAME_COMPONENT(KDECORE_LIBRARY ${KDECORE_LIBRARY} PATH)
838
839 find_path(KIO_INCLUDE_DIR "kio_export.h" PATH_SUFFIXES "kio")
840 find_library(KIO_LIBRARY NAMES "kio")
841 GET_FILENAME_COMPONENT(KIO_LIBRARY ${KIO_LIBRARY} PATH)
842
843 find_path(KDE_INCLUDE_DIR "KDirWatch" PATH_SUFFIXES "KDE")
844
845 if (NOT KDECORE_LIBRARY)
846 message (STATUS " * KDECORE Dir: ${KDECORE_INCLUDE_DIR}")
847 message (STATUS " * KDECORE Library: ${KDECORE_LIBRARY}")
848 else()
849 message (STATUS " * KDECORE unavailable")
850 endif()
851 if (NOT KIO_LIBRARY)
852 message (STATUS " * KIO Dir: ${KIO_INCLUDE_DIR}")
853 message (STATUS " * KIO Library: ${KIO_LIBRARY}")
854 else()
855 message (STATUS " * KIO unavailable")
856 endif()
857 if (NOT KDE_LIBRARY) ## always empty?
858 message (STATUS " * KDE4 Dir: ${KDE_INCLUDE_DIR}")
859 message (STATUS " * KDE4 Library: ${KDE_LIBRARY}")
860 else()
861 message (STATUS " * KDE4 unavailable")
862 endif()
863
864 if (QT4_FOUND
865 AND KDECORE_INCLUDE_DIR
866 AND KDECORE_LIBRARY
867 AND KIO_INCLUDE_DIR
868 AND KIO_LIBRARY
869 AND KDE_INCLUDE_DIR)
870 message (STATUS " KDE: OK")
871 set (VERSION_KDE_INTEGRATION "0.0.4")
872 set (PACKAGE_KDE_INTEGRATION "cd_kde-integration")
873 set (with_kde_integration2 yes)
874 set (kde_integrationdatadir "${pluginsdatadir}/kde-integration2")
875 add_subdirectory ("kde-integration2")
876 else()
877 message (STATUS "Could not find kde libs; Cairo-Dock won't be built with KDE support.")
878 message (STATUS "These libraries are required to compile KDE experimental applet: kdecore, kio, kde4")
879 set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} kdecore, kio, kde4")
880 endif()
881 elseif (enable-kde-integration)
882 pkg_check_modules (KDE_INTEGRATION gio-2.0)
883 message (STATUS " KDE_INTEGRATION_FOUND: ${KDE_INTEGRATION_FOUND}")
884 if (NOT KDE_INTEGRATION_FOUND)
885 message (STATUS "Could not find gio; Cairo-Dock won't be built with KDE support.")
886 message (STATUS "This module is required to compile KDE-Integration applet: gio-2.0")
887 set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} gio-2.0")
888 else()
889 set (GETTEXT_KDE_INTEGRATION ${GETTEXT_PLUGINS})
890 set (VERSION_KDE_INTEGRATION "1.0.4")
891 set (PACKAGE_KDE_INTEGRATION "cd_kde-integration")
892 set (with_kde_integration yes)
893 set (kde_integrationdatadir "${pluginsdatadir}/kde-integration")
894 add_subdirectory ("kde-integration")
895 endif()
896 endif()
897
898 ############# KEYBOARD_INDICATOR #################
899 message (STATUS "> Keyboard-Indicator:")
900 set (with_keyboard_indicator no)
901 enable_if_not_defined (enable-keyboard-indicator)
902 if (enable-keyboard-indicator)
903 pkg_check_modules (KEYBOARD_INDICATOR_PACKAGE libxklavier)
904 if (NOT KEYBOARD_INDICATOR_PACKAGE_FOUND)
905 message (STATUS "Could not find libxklavier; Cairo-Dock won't be built with keyboard-indicator applet.")
906 message (WARNING "This module is required to compile Keyboard-Indicator applet: libxklavier")
907 set (MODULES_MISSING "${MODULES_MISSING} libxklavier")
908 else()
909 set (GETTEXT_KEYBOARD_INDICATOR ${GETTEXT_PLUGINS})
910 set (VERSION_KEYBOARD_INDICATOR "1.2.1")
911 set (PACKAGE_KEYBOARD_INDICATOR "cd-keyboard-indicator")
912 set (with_keyboard_indicator yes)
913 set (keyboard_indicatordatadir "${pluginsdatadir}/keyboard-indicator")
914 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/keyboard-indicator/data/keyboard-indicator.conf.in ${CMAKE_CURRENT_BINARY_DIR}/keyboard-indicator/data/keyboard-indicator.conf)
915 add_subdirectory ("keyboard-indicator")
916 endif()
917 endif()
918
919 ############# LOGOUT #################
920 message (STATUS "> Logout:")
921 set (GETTEXT_LOGOUT ${GETTEXT_PLUGINS})
922 set (VERSION_LOGOUT "2.0.4")
923 set (PACKAGE_LOGOUT "cd-logout")
924 set (logoutdatadir "${pluginsdatadir}/logout")
925 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/logout/data/logout.conf.in ${CMAKE_CURRENT_BINARY_DIR}/logout/data/logout.conf)
926 add_subdirectory (logout)
927
928 ############# MAIL #################
929 message (STATUS "> Mail:")
930 set (with_mail no)
931 # find the compilation flags
932 enable_if_not_defined (enable-mail)
933 if (enable-mail)
934 execute_process(
935 COMMAND pkg-config libetpan --cflags
936 OUTPUT_VARIABLE MAIL_PACKAGE_CFLAGS)
937 if (NOT "${MAIL_PACKAGE_CFLAGS}" STREQUAL "" AND NOT "${MAIL_PACKAGE_CFLAGS}" STREQUAL "\n") # if there is a problem with the previous, we don't want to have a lot of errors
938 STRING (REGEX REPLACE "\n" "" TMP_VARIABLE "${MAIL_PACKAGE_CFLAGS}") # to not skip the last option
939 STRING (REGEX MATCHALL "(^| )-I[^ ]+( |$)" TMP_VARIABLE "${TMP_VARIABLE}") # first extract the "-I" options
940 STRING (REGEX REPLACE ";" "" TMP_VARIABLE "${TMP_VARIABLE}")
941 STRING (REGEX REPLACE " $" "" TMP_VARIABLE "${TMP_VARIABLE}")
942 STRING (REGEX REPLACE "^ " "" TMP_VARIABLE "${TMP_VARIABLE}")
943 STRING (REGEX REPLACE " " " " TMP_VARIABLE "${TMP_VARIABLE}")
944 STRING (REGEX REPLACE "-I([^ ]+)" "\\1" MAIL_PACKAGE_INCLUDE_DIRS "${TMP_VARIABLE}") # then remove the "-I" string
945 endif()
946 # find the link flags
947 execute_process(
948 COMMAND pkg-config libetpan --libs
949 OUTPUT_VARIABLE MAIL_PACKAGE_LIBS)
950 if (NOT "${MAIL_PACKAGE_LIBS}" STREQUAL "")
951 STRING (REGEX REPLACE "\n" "" MAIL_PACKAGE_LIBS "${MAIL_PACKAGE_LIBS}")
952 # find the link libraries
953 STRING (REGEX MATCHALL "(^| )-l[^ ]+( |$)" TMP_VARIABLE "${MAIL_PACKAGE_LIBS}") # extract the "-l" options (only if it's separated by two blank spaces or the end/beginning of the line => -L/usr/lib/x86_64-linux-gnu)
954 STRING (REGEX REPLACE ";" "" TMP_VARIABLE "${TMP_VARIABLE}")
955 STRING (REGEX REPLACE "^ " "" TMP_VARIABLE "${TMP_VARIABLE}")
956 STRING (REGEX REPLACE " " " " TMP_VARIABLE "${TMP_VARIABLE}")
957 STRING (REGEX REPLACE " $" "" MAIL_PACKAGE_LIBRARIES "${TMP_VARIABLE}")
958 # find the link directories
959 STRING (REGEX MATCHALL "(^| )-L[^ ]+( |$)" TMP_VARIABLE "${MAIL_PACKAGE_LIBS}") # extract the "-L" options
960 STRING (REGEX REPLACE ";" "" TMP_VARIABLE "${TMP_VARIABLE}")
961 STRING (REGEX REPLACE " $" "" TMP_VARIABLE "${TMP_VARIABLE}")
962 STRING (REGEX REPLACE "^ " "" TMP_VARIABLE "${TMP_VARIABLE}")
963 STRING (REGEX REPLACE " " " " TMP_VARIABLE "${TMP_VARIABLE}")
964 STRING (REGEX REPLACE "-L([^ ]+)" "\\1" MAIL_PACKAGE_LIBRARY_DIRS "${TMP_VARIABLE}") # then remove the "-L" string
965 endif()
966 if ("${MAIL_PACKAGE_LIBS}" STREQUAL "")
967 message (STATUS "warning : Could not find libetpan; Cairo-Dock won't be built with Mail applet.")
968 message (WARNING "This module is required to compile Mail applet: libetpan")
969 set (PROGRAMS_MISSING "${PROGRAMS_MISSING} libetpan-config")
970 else()
971 message (STATUS " libetpan found. Using the following options:")
972 message (STATUS " Include directories: ${MAIL_PACKAGE_INCLUDE_DIRS}")
973 message (STATUS " Link directories: ${MAIL_PACKAGE_LIBRARY_DIRS}")
974 message (STATUS " Link libraries: ${MAIL_PACKAGE_LIBRARIES}")
975 set (GETTEXT_MAIL ${GETTEXT_PLUGINS})
976 set (VERSION_MAIL "1.0.14")
977 set (PACKAGE_MAIL "cd-mail")
978 set (maildatadir "${pluginsdatadir}/mail")
979 set (with_mail yes)
980 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/mail/data/mail.conf.in ${CMAKE_CURRENT_BINARY_DIR}/mail/data/mail.conf)
981 add_subdirectory ("mail")
982 endif()
983 endif()
984
985 ############# MESSAGING_MENU #################
986 set (with_messaging_menu no)
987 if (with_indicator)
988 message (STATUS "> Messaging-Menu:")
989 if (with_indicator3)
990 set (INDICATOR_MESSAGES_WITH_IND3 TRUE) # If it's supported, it's maybe better to use it
991 endif()
992 set (GETTEXT_MESSAGING_MENU ${GETTEXT_PLUGINS})
993 set (VERSION_MESSAGING_MENU "1.0.7")
994 set (PACKAGE_MESSAGING_MENU "cd-Messaging-Menu")
995 set (with_messaging_menu yes)
996 set (messaging_menudatadir "${pluginsdatadir}/Messaging-Menu")
997 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Messaging-Menu/data/Messaging-Menu.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Messaging-Menu/data/Messaging-Menu.conf)
998 add_subdirectory (Messaging-Menu)
999 endif()
1000
1001 ############# MOTION BLUR #################
1002 message (STATUS "> Motion Blur:")
1003 set (GETTEXT_MOTION_BLUR ${GETTEXT_PLUGINS})
1004 set (VERSION_MOTION_BLUR "1.0.6")
1005 set (PACKAGE_MOTION_BLUR "cd-motion_blur")
1006 set (motion_blurdatadir "${pluginsdatadir}/motion-blur")
1007 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/motion-blur/data/motion_blur.conf.in ${CMAKE_CURRENT_BINARY_DIR}/motion-blur/data/motion_blur.conf)
1008 add_subdirectory (motion-blur)
1009
1010 ############# MUSICPLAYER #################
1011 message (STATUS "> MusicPlayer:")
1012 set (GETTEXT_MUSICPLAYER ${GETTEXT_PLUGINS})
1013 set (VERSION_MUSICPLAYER "2.0.4")
1014 set (PACKAGE_MUSICPLAYER "cd-musicPlayer")
1015 set (musicplayerdatadir "${pluginsdatadir}/musicPlayer")
1016 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/musicPlayer/data/musicPlayer.conf.in ${CMAKE_CURRENT_BINARY_DIR}/musicPlayer/data/musicPlayer.conf)
1017 add_subdirectory (musicPlayer)
1018
1019 ############# NETSPEED #################
1020 message (STATUS "> NetSpeed:")
1021 set (GETTEXT_NETSPEED ${GETTEXT_PLUGINS})
1022 set (VERSION_NETSPEED "1.2.12")
1023 set (PACKAGE_NETSPEED "cd-netspeed")
1024 set (netspeeddatadir "${pluginsdatadir}/netspeed")
1025 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/netspeed/data/netspeed.conf.in ${CMAKE_CURRENT_BINARY_DIR}/netspeed/data/netspeed.conf)
1026 add_subdirectory (netspeed)
1027
1028 ############# NETWORK_MONITOR #################
1029 set (with_network_monitor no) # unstable
1030 if (enable-network-monitor)
1031 message (STATUS "> Network Monitor:")
1032 set (GETTEXT_NETWORK_MONITOR ${GETTEXT_PLUGINS})
1033 set (VERSION_NETWORK_MONITOR "0.2.10")
1034 set (PACKAGE_NETWORK_MONITOR "cd-network-monitor")
1035 set (with_network_monitor yes)
1036 set (network_monitordatadir "${pluginsdatadir}/Network-Monitor")
1037 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Network-Monitor/data/Network-Monitor.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Network-Monitor/data/Network-Monitor.conf)
1038 add_subdirectory (Network-Monitor)
1039 endif()
1040
1041 ############# POWERMANAGER #################
1042 message (STATUS "> PowerManager:")
1043 set (GETTEXT_POWERMANAGER ${GETTEXT_PLUGINS})
1044 set (VERSION_POWERMANAGER "1.3.12")
1045 set (PACKAGE_POWERMANAGER "cd-powermanager")
1046 set (powermanagerdatadir "${pluginsdatadir}/powermanager")
1047 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/powermanager/data/powermanager.conf.in ${CMAKE_CURRENT_BINARY_DIR}/powermanager/data/powermanager.conf)
1048 add_subdirectory (powermanager)
1049
1050 ############# QUICK BROWSER #################
1051 message (STATUS "> Quick Browser:")
1052 set (GETTEXT_QUICK_BROWSER ${GETTEXT_PLUGINS})
1053 set (VERSION_QUICK_BROWSER "1.0.13")
1054 set (PACKAGE_QUICK_BROWSER "cd-quick-browser")
1055 set (quick_browserdatadir "${pluginsdatadir}/quick_browser")
1056 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/quick-browser/data/quick-browser.conf.in ${CMAKE_CURRENT_BINARY_DIR}/quick-browser/data/quick-browser.conf)
1057 add_subdirectory (quick-browser)
1058
1059 ############# RECENT-EVENTS #################
1060 message (STATUS "> Recent-Events:")
1061 set (with_recent_events no)
1062 enable_if_not_defined (enable-recent-events)
1063 if (enable-recent-events)
1064 pkg_check_modules (RECENT_EVENTS zeitgeist-2.0)
1065 if (NOT RECENT_EVENTS_FOUND)
1066 message (STATUS "Could not find 'zeitgeist-2.0'; trying with an old version 'zeitgeist-1.0'...")
1067 pkg_check_modules (RECENT_EVENTS zeitgeist-1.0)
1068 set (ZEITGEIST_1_0 1)
1069 endif()
1070 if (NOT RECENT_EVENTS_FOUND)
1071 message (STATUS "Could not find libzeitgeist; Cairo-Dock won't be built with Zeitgeist support.")
1072 message (WARNING "This module is required to compile Recent-Events applet: zeitgeist-x.0")
1073 set (MODULES_MISSING "${MODULES_MISSING} zeitgeist-x.0")
1074 else()
1075 set (GETTEXT_RECENT_EVENTS ${GETTEXT_PLUGINS})
1076 set (VERSION_RECENT_EVENTS "1.0.4")
1077 set (PACKAGE_RECENT_EVENTS "cd-Recent-Events")
1078 if (ZEITGEIST_1_0)
1079 set (with_recent_events "yes (zeitgeist 1.0)")
1080 else()
1081 set (with_recent_events "yes (zeitgeist 2.0)")
1082 endif()
1083 set (recent_eventsdatadir "${pluginsdatadir}/Recent-Events")
1084 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Recent-Events/data/Recent-Events.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Recent-Events/data/Recent-Events.conf)
1085 add_subdirectory ("Recent-Events")
1086 endif()
1087 endif()
1088
1089 ############# REMOTE_CONTROL #################
1090 message (STATUS "> Remote Control:")
1091 set (GETTEXT_REMOTE_CONTROL ${GETTEXT_PLUGINS})
1092 set (VERSION_REMOTE_CONTROL "1.0.3")
1093 set (PACKAGE_REMOTE_CONTROL "cd-Remote-Control")
1094 set (remote_controldatadir "${pluginsdatadir}/Remote-Control")
1095 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Remote-Control/data/Remote-Control.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Remote-Control/data/Remote-Control.conf)
1096 add_subdirectory (Remote-Control)
1097
1098 ############# RSSREADER #################
1099 message (STATUS "> RSSreader:")
1100 set (GETTEXT_RSS_READER ${GETTEXT_PLUGINS})
1101 set (VERSION_RSS_READER "1.0.8")
1102 set (PACKAGE_RSS_READER "cd-rssreader")
1103 set (rss_readerdatadir "${pluginsdatadir}/RSSreader")
1104 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/RSSreader/data/RSSreader.conf.in ${CMAKE_CURRENT_BINARY_DIR}/RSSreader/data/RSSreader.conf)
1105 add_subdirectory (RSSreader)
1106
1107 ############# SCOOBY_DO #################
1108 set (with_scooby_do no) # unstable
1109 if (enable-scooby-do)
1110 message (STATUS "> Scooby-Do:")
1111 set (GETTEXT_SCOOBY_DO ${GETTEXT_PLUGINS})
1112 set (VERSION_SCOOBY_DO "0.1.4")
1113 set (PACKAGE_SCOOBY_DO "cd-scooby-do")
1114 set (with_scooby_do yes)
1115 set (scooby_dodatadir "${pluginsdatadir}/Scooby-Do")
1116 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Scooby-Do/data/Scooby-Do.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Scooby-Do/data/Scooby-Do.conf)
1117 add_subdirectory (Scooby-Do)
1118 endif()
1119
1120 ############# SCREENSHOT #################
1121 message (STATUS "> Screenshot:")
1122 set (GETTEXT_SCREENSHOT ${GETTEXT_PLUGINS})
1123 set (VERSION_SCREENSHOT "0.0.2")
1124 set (PACKAGE_SCREENSHOT "cd-Screenshot")
1125 set (screenshotdatadir "${pluginsdatadir}/Screenshot")
1126 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Screenshot/data/Screenshot.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Screenshot/data/Screenshot.conf)
1127 add_subdirectory (Screenshot)
1128
1129 ############# SHORTCUTS #################
1130 message (STATUS "> Shortcuts:")
1131 set (GETTEXT_SHORTCUTS ${GETTEXT_PLUGINS})
1132 set (VERSION_SHORTCUTS "1.3.6")
1133 set (PACKAGE_SHORTCUTS "cd-shortcuts")
1134 set (shortcutsdatadir "${pluginsdatadir}/shortcuts")
1135 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/shortcuts/data/shortcuts.conf.in ${CMAKE_CURRENT_BINARY_DIR}/shortcuts/data/shortcuts.conf)
1136 add_subdirectory (shortcuts)
1137
1138 ############# SHOW DESKTOP #################
1139 message (STATUS "> ShowDesktop:")
1140 enable_if_not_defined (enable-xrandr-support)
1141 if (enable-xrandr-support)
1142 pkg_check_modules (SHOW_DESKTOP_XRANDR xrandr)
1143 if (NOT SHOW_DESKTOP_XRANDR_FOUND)
1144 message (STATUS "Could not find xrandr; ShowDesktop won't be built with screen resolution abilities.")
1145 message (WARNING "This module is required to compile ShowDesktop applet with xRandr support: xrandr")
1146 set (MODULES_MISSING "${MODULES_MISSING} xrandr")
1147 set (with_xrandr no)
1148 else ()
1149 set (with_xrandr yes)
1150 endif()
1151 endif()
1152 set (GETTEXT_SHOW_DESKTOP ${GETTEXT_PLUGINS})
1153 set (VERSION_SHOW_DESKTOP "1.2.9")
1154 set (PACKAGE_SHOW_DESKTOP "cd-showDesktop")
1155 set (show_desktopdatadir "${pluginsdatadir}/showDesktop")
1156 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/showDesktop/data/showDesktop.conf.in ${CMAKE_CURRENT_BINARY_DIR}/showDesktop/data/showDesktop.conf)
1157 add_subdirectory (showDesktop)
1158
1159 ############# SHOW MOUSE #################
1160 message (STATUS "> Show Mouse:")
1161 set (GETTEXT_SHOW_MOUSE ${GETTEXT_PLUGINS})
1162 set (VERSION_SHOW_MOUSE "1.0.6")
1163 set (PACKAGE_SHOW_MOUSE "cd-show_mouse")
1164 set (show_mousedatadir "${pluginsdatadir}/show_mouse")
1165 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/show-mouse/data/show_mouse.conf.in ${CMAKE_CURRENT_BINARY_DIR}/show-mouse/data/show_mouse.conf)
1166 add_subdirectory (show-mouse)
1167
1168 ############# SLIDER #################
1169 message (STATUS "> Slider:")
1170 set (with_exif no)
1171 enable_if_not_defined (enable-exif-support)
1172 if (enable-exif-support)
1173 pkg_check_modules (EXIF libexif)
1174 if (NOT EXIF_FOUND)
1175 message (STATUS "Could not find libexif; Slider won't be able to rotate the images accordingly to their exif data.")
1176 message (WARNING "This module is required to compile Slider applet with Exif support: libexif")
1177 set (MODULES_MISSING "${MODULES_MISSING} libexif")
1178 else ()
1179 set (with_exif yes)
1180 endif()
1181 endif()
1182 set (GETTEXT_SLIDER ${GETTEXT_PLUGINS})
1183 set (VERSION_SLIDER "2.0.15")
1184 set (PACKAGE_SLIDER "cd-slider")
1185 set (sliderdatadir "${pluginsdatadir}/slider")
1186 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/slider/data/slider.conf.in ${CMAKE_CURRENT_BINARY_DIR}/slider/data/slider.conf)
1187 add_subdirectory (slider)
1188
1189 ############# SOUND_EFFECTS #################
1190 set (with_sound_effects no)
1191 enable_if_not_defined (enable-sound-effects)
1192 if (enable-sound-effects)
1193 pkg_check_modules (ALSA_PACKAGE alsa)
1194 if (NOT ALSA_PACKAGE_FOUND)
1195 message (STATUS "Could not find alsa; Cairo-Dock won't be built with Sound-Effect applet.")
1196 message (WARNING "This module is required to compile Sound-Effect applet: alsa")
1197 set (MODULES_MISSING "${MODULES_MISSING} alsa")
1198 else()
1199 message (STATUS "> Sound-Effects:")
1200 set (GETTEXT_SOUND_EFFECTS ${GETTEXT_PLUGINS})
1201 set (VERSION_SOUND_EFFECTS "0.0.2")
1202 set (PACKAGE_SOUND_EFFECTS "cd-Sound-Effects")
1203 set (with_sound_effects yes)
1204 set (sound_effectsdatadir "${pluginsdatadir}/Sound-Effects")
1205 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Sound-Effects/data/Sound-Effects.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Sound-Effects/data/Sound-Effects.conf)
1206 add_subdirectory (Sound-Effects)
1207 endif()
1208 endif()
1209
1210 ############# STACK #################
1211 message (STATUS "> Stack:")
1212 set (GETTEXT_STACK ${GETTEXT_PLUGINS})
1213 set (VERSION_STACK "0.3.6")
1214 set (PACKAGE_STACK "cd-stack")
1215 set (stackdatadir "${pluginsdatadir}/stack")
1216 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/stack/data/stack.conf.in ${CMAKE_CURRENT_BINARY_DIR}/stack/data/stack.conf)
1217 add_subdirectory (stack)
1218
1219 ############# STATUS NOTIFIER #################
1220 message (STATUS "> Status Notifier:")
1221 if (NOT DBUSMENU_GTK_FOUND)
1222 message (STATUS "Could not find Status-Notifier libs; Cairo-Dock won't be built with Status-Notifier support.")
1223 message (WARNING "This module is required to compile Status Notifier applet: ${DBUSMENU_GTK_MODULE}(-0.4)")
1224 # set (MODULES_MISSING "${MODULES_MISSING} dbusmenu-gtk(-0.4)") # it should already be in the list.
1225 set (with_status_notifier no)
1226 else()
1227 if (force_indicator_applicationadded_have_hint)
1228 set (INDICATOR_APPLICATIONADDED_HAS_HINT 1)
1229 elseif (DEFINED force_indicator_applicationadded_have_hint)
1230 set (INDICATOR_APPLICATIONADDED_HAS_HINT 0)
1231 endif()
1232 message (STATUS " ApplicationAdded signal has 'Hint' = ${INDICATOR_APPLICATIONADDED_HAS_HINT}")
1233 message (STATUS " ApplicationAdded signal has 'Title' = ${INDICATOR_APPLICATIONADDED_HAS_TITLE}")
1234 set (GETTEXT_STATUS_NOTIFIER ${GETTEXT_PLUGINS})
1235 set (VERSION_STATUS_NOTIFIER "0.1.9")
1236 set (PACKAGE_STATUS_NOTIFIER "cd-status-notifier")
1237 set (with_status_notifier yes)
1238 set (status_notifierdatadir "${pluginsdatadir}/Status-Notifier")
1239 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Status-Notifier/data/Status-Notifier.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Status-Notifier/data/Status-Notifier.conf)
1240 add_subdirectory (Status-Notifier)
1241 endif()
1242
1243 ############# SWITCHER #################
1244 message (STATUS "> Switcher:")
1245 set (GETTEXT_SWITCHER ${GETTEXT_PLUGINS})
1246 set (VERSION_SWITCHER "2.2.1")
1247 set (PACKAGE_SWITCHER "cd-switcher")
1248 set (switcherdatadir "${pluginsdatadir}/switcher")
1249 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/switcher/data/switcher.conf.in ${CMAKE_CURRENT_BINARY_DIR}/switcher/data/switcher.conf)
1250 add_subdirectory (switcher)
1251
1252 ############# SYSTEM MONITOR #################
1253 message (STATUS "> System Monitor:")
1254 enable_if_not_defined (enable-sensors-support)
1255 if (enable-sensors-support)
1256 find_package (Sensors)
1257 if (NOT SENSORS_FOUND)
1258 message (STATUS "Could not find libsensors; System-Monitor won't be able to monitor fan speed and CPU temperature.")
1259 message (WARNING "This package is required to compile System Monitor applet with Sensors support: sensors")
1260 set (PROGRAMS_MISSING "${PROGRAMS_MISSING} sensors")
1261 set (with_sensors no)
1262 else ()
1263 set (with_sensors yes)
1264 endif()
1265 endif()
1266 set (GETTEXT_SYSTEM_MONITOR ${GETTEXT_PLUGINS})
1267 set (VERSION_SYSTEM_MONITOR "1.0.14")
1268 set (PACKAGE_SYSTEM_MONITOR "cd-system-monitor")
1269 set (system_monitordatadir "${pluginsdatadir}/System-monitor")
1270 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/System-Monitor/data/System-Monitor.conf.in ${CMAKE_CURRENT_BINARY_DIR}/System-Monitor/data/System-Monitor.conf)
1271 add_subdirectory (System-Monitor)
1272
1273 ############# SYSTRAY #################
1274 message (STATUS "> Systray:")
1275 set (GETTEXT_SYSTRAY ${GETTEXT_PLUGINS})
1276 set (VERSION_SYSTRAY "0.2.7")
1277 set (PACKAGE_SYSTRAY "cd-systray")
1278 set (systraydatadir "${pluginsdatadir}/systray")
1279 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/systray/data/systray.conf.in ${CMAKE_CURRENT_BINARY_DIR}/systray/data/systray.conf)
1280 add_subdirectory (systray)
1281
1282 ############# TERMINAL #################
1283 message (STATUS "> Terminal:")
1284 enable_if_not_defined (enable-terminal)
1285 if (enable-terminal)
1286 set (TERMINAL_MODULE vte-2.91)
1287 pkg_check_modules (VTE ${TERMINAL_MODULE})
1288 if (NOT VTE_FOUND)
1289 set (TERMINAL_MODULE vte-2.90)
1290 pkg_check_modules (VTE ${TERMINAL_MODULE})
1291 endif()
1292 if (NOT VTE_FOUND)
1293 message (STATUS "Could not find ${TERMINAL_MODULE}; Cairo-Dock won't be built with terminal applet.")
1294 message (WARNING "This module is required to compile Terminal applet: ${TERMINAL_MODULE}")
1295 set (MODULES_MISSING "${MODULES_MISSING} ${TERMINAL_MODULE}")
1296 set (with_terminal no)
1297 else()
1298 set (GETTEXT_TERMINAL ${GETTEXT_PLUGINS})
1299 set (VERSION_TERMINAL "1.0.13")
1300 set (PACKAGE_TERMINAL "cd-terminal")
1301 set (with_terminal yes)
1302 set (terminaldatadir "${pluginsdatadir}/terminal")
1303 STRING (REGEX REPLACE "\\..*" "" VTE_MAJOR "${VTE_VERSION}")
1304 STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" VTE_MINOR "${VTE_VERSION}") # 0.1.7 => 1.7
1305 STRING (REGEX REPLACE "\\.[0-9]*" "" VTE_MINOR "${VTE_MINOR}")
1306 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/terminal/data/terminal.conf.in ${CMAKE_CURRENT_BINARY_DIR}/terminal/data/terminal.conf)
1307 add_subdirectory (terminal)
1308 endif()
1309 endif()
1310
1311 ############# TOMBOY #################
1312 message (STATUS "> Tomboy:")
1313 set (GETTEXT_TOMBOY ${GETTEXT_PLUGINS})
1314 set (VERSION_TOMBOY "1.3.6")
1315 set (PACKAGE_TOMBOY "cd-tomboy")
1316 set (tomboydatadir "${pluginsdatadir}/tomboy")
1317 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/tomboy/data/tomboy.conf.in ${CMAKE_CURRENT_BINARY_DIR}/tomboy/data/tomboy.conf)
1318 add_subdirectory (tomboy)
1319
1320 ############# TOONS #################
1321 message (STATUS "> Toons:")
1322 set (GETTEXT_TOONS ${GETTEXT_PLUGINS})
1323 set (VERSION_TOONS "1.0.15")
1324 set (PACKAGE_TOONS "cd-Toons")
1325 set (toonsdatadir "${pluginsdatadir}/Toons")
1326 set (toonsuserdirname "Toons")
1327 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Toons/data/Toons.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Toons/data/Toons.conf)
1328 add_subdirectory (Toons)
1329
1330 ############# WEATHER #################
1331 message (STATUS "> Weather:")
1332 set (with_weather no)
1333 set (WEATHER_MODULE openssl)
1334 pkg_check_modules (WEATHER ${WEATHER_MODULE})
1335 if (NOT WEATHER_FOUND)
1336 message (STATUS "Could not find ${WEATHER_MODULE}; Cairo-Dock won't be built with Weather applet.")
1337 message (WARNING "This module is required to compile Weather applet: ${WEATHER_MODULE}")
1338 set (MODULES_MISSING "${MODULES_MISSING} ${WEATHER_MODULE}")
1339 else()
1340 set (GETTEXT_WEATHER ${GETTEXT_PLUGINS})
1341 set (VERSION_WEATHER "2.1.0")
1342 set (PACKAGE_WEATHER "cd-weather")
1343 set (weatherdatadir "${pluginsdatadir}/weather")
1344 set (weatheruserdirname "weather")
1345 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/weather/data/weather.conf.in ${CMAKE_CURRENT_BINARY_DIR}/weather/data/weather.conf)
1346 add_subdirectory (weather)
1347 set (with_weather yes)
1348 endif()
1349
1350 ############# WEBLETS #################
1351 message (STATUS "> Weblets:")
1352 set (with_weblets no)
1353 enable_if_not_defined (enable-weblets)
1354 if (enable-weblets)
1355 set (WEBKIT_MODULE webkitgtk-3.0)
1356 pkg_check_modules (WEBKIT ${WEBKIT_MODULE})
1357 if (NOT WEBKIT_FOUND)
1358 message (STATUS "Could not find ${WEBKIT_MODULE}; Cairo-Dock won't be built with Weblets applet.")
1359 message (WARNING "This module is required to compile Weblets applet: ${WEBKIT_MODULE}")
1360 set (MODULES_MISSING "${MODULES_MISSING} ${WEBKIT_MODULE}")
1361 else()
1362 set (GETTEXT_WEBLETS ${GETTEXT_PLUGINS})
1363 set (VERSION_WEBLETS "0.0.15")
1364 set (PACKAGE_WEBLETS "cd-weblets")
1365 set (webletsdatadir "${pluginsdatadir}/weblets")
1366 set (with_weblets yes)
1367 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/weblets/data/weblets.conf.in ${CMAKE_CURRENT_BINARY_DIR}/weblets/data/weblets.conf)
1368 add_subdirectory ("weblets")
1369 endif()
1370 endif()
1371
1372 ############# WIFI #################
1373 message (STATUS "> WiFi:")
1374 set (GETTEXT_WIFI ${GETTEXT_PLUGINS})
1375 set (VERSION_WIFI "1.3.3")
1376 set (PACKAGE_WIFI "cd-wifi")
1377 set (wifidatadir "${pluginsdatadir}/wifi")
1378 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/wifi/data/wifi.conf.in ${CMAKE_CURRENT_BINARY_DIR}/wifi/data/wifi.conf)
1379 add_subdirectory (wifi)
1380
1381 ############# XFCE-INTEGRATION #################
1382 message (STATUS "> XFCE-Integration:")
1383 set (with_xfce_integration no)
1384 enable_if_not_defined (enable-xfce-integration)
1385 if (enable-xfce-integration)
1386 pkg_check_modules (XFCE_INTEGRATION_THUNAR QUIET thunar-vfs-1) # thunar-vfs is not used if gvfs (gio) is available
1387 pkg_check_modules (XFCE_INTEGRATION_GVFS gio-2.0)
1388 if (XFCE_INTEGRATION_THUNAR_FOUND AND XFCE_INTEGRATION_GVFS_FOUND)
1389 message (STATUS "Could find neither thunar-vfs or libgio-2.0; Cairo-Dock won't be built with XFCE support.")
1390 message (STATUS "This module is required to compile XFCE-Integration applet: gio-2.0 (or thunar-vfs-1)")
1391 set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} gio-2.0")
1392 else()
1393 set (GETTEXT_XFCE_INTEGRATION ${GETTEXT_PLUGINS})
1394 set (VERSION_XFCE_INTEGRATION "1.0.4")
1395 set (PACKAGE_XFCE_INTEGRATION "cd_xfce-integration")
1396 set (with_xfce_integration yes)
1397 set (xfce_integrationdatadir "${pluginsdatadir}/xfce-integration")
1398 add_subdirectory ("xfce-integration")
1399 endif()
1400 endif()
1401
1402 ############# XGAMMA #################
1403 message (STATUS "> XGamma:")
1404 enable_if_not_defined (enable-xgamma)
1405 if (enable-xgamma)
1406 pkg_check_modules (XGAMMA_PACKAGE x11 xxf86vm)
1407 if (NOT XGAMMA_PACKAGE_FOUND)
1408 message (STATUS "Could not find xxf86vm; Cairo-Dock won't be built with Xgamma applet.")
1409 message (WARNING "These modules are required to compile XGamma applet: x11 and xxf86vm")
1410 set (MODULES_MISSING "${MODULES_MISSING} x11 xxf86vm")
1411 set (with_xgamma no)
1412 else()
1413 set (GETTEXT_XGAMMA ${GETTEXT_PLUGINS})
1414 set (VERSION_XGAMMA "1.2.5")
1415 set (PACKAGE_XGAMMA "cd-Xgamma")
1416 set (with_xgamma yes)
1417 set (xgammadatadir "${pluginsdatadir}/Xgamma")
1418 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Xgamma/data/Xgamma.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Xgamma/data/Xgamma.conf)
1419 add_subdirectory ("Xgamma")
1420 endif()
1421 endif()
1422
1423 message ("")
1424 message (STATUS "===============")
1425 message (STATUS "Language build:")
1426 message (STATUS "===============")
1427 message ("")
1428 add_subdirectory (po)
1429
1430 message ("")
1431 message (STATUS "===============")
1432 message (STATUS "Plug-ins build:")
1433 message (STATUS "===============")
1434 message ("")
1435 message (STATUS "Stable:")
1436 message (STATUS " Integration plug-ins:")
1437 message (STATUS " - with Gnome support: ${with_gnome_integration}")
1438 message (STATUS " - with KDE support: ${with_kde_integration}")
1439 message (STATUS " - with XFCE support: ${with_xfce_integration}")
1440 message (STATUS " Plug-ins:")
1441 message (STATUS " - with Alsa-Mixer applet: ${with_alsa}")
1442 message (STATUS " - with GMenu applet: ${with_gmenu}")
1443 message (STATUS " - with Impulse applet: ${with_impulse}")
1444 message (STATUS " - with Indicator-Generic applet: ${with_indicator_generic}")
1445 message (STATUS " - with Keyboard-indicator applet: ${with_keyboard_indicator}")
1446 message (STATUS " - with Mail applet: ${with_mail}")
1447 message (STATUS " - with Messaging-Menu applet: ${with_messaging_menu}")
1448 message (STATUS " - with Recent-Events applet: ${with_recent_events}")
1449 message (STATUS " - with Sound Effects applet: ${with_sound_effects}")
1450 message (STATUS " - with Status-Notifier applet: ${with_status_notifier}")
1451 message (STATUS " - with Terminal applet: ${with_terminal}")
1452 message (STATUS " - with Weather applet: ${with_weather}")
1453 message (STATUS " - with Weblets applet: ${with_weblets}")
1454 message (STATUS " - with Xgamma applet: ${with_xgamma}")
1455 message (STATUS "Add On:")
1456 message (STATUS " - with Sound-Menu support: ${with_soundmenu}")
1457 message (STATUS " - with Screen Resolution support: ${with_xrandr}")
1458 message (STATUS " - with Sensors support: ${with_sensors}")
1459 message (STATUS " - with UPower support: ${with_upower_support}")
1460 message (STATUS " - with iCal support: ${with_ical}")
1461 message (STATUS " - with Exif support: ${with_exif}")
1462 message (STATUS "Third Party Interfaces:")
1463 message (STATUS " - with Python2 interface: ${with_python2}")
1464 message (STATUS " - with Python3 interface: ${with_python3}")
1465 message (STATUS " - with Ruby interface: ${with_ruby}")
1466 message (STATUS " - with Mono interface: ${with_mono}")
1467 message (STATUS " - with Vala interface: ${with_vala}")
1468 message (STATUS " - with Vala Translator (valac): ${with_valac}")
1469 message (STATUS "Unstable:")
1470 message (STATUS " - with Global-Menu applet: ${with_global_menu}")
1471 message (STATUS " - with Disks applet: ${with_disks}")
1472 message (STATUS " - with Doncky applet: ${with_doncky}")
1473 message (STATUS " - with KDE experimental support: ${with_kde_integration2}")
1474 message (STATUS " - with Network-Monitor applet: ${with_network_monitor}")
1475 message (STATUS " - with Scooby-Do applet: ${with_scooby_do}")
1476 message (STATUS "Deprecated:")
1477 message (STATUS " - with old Gnome support: ${with_gnome_integration_old}")
1478
1479 if (NOT "${MODULES_MISSING}" STREQUAL "")
1480 message ("")
1481 message (STATUS "WARNING: It seems that one (or more) module(s) is (are) missing:${MODULES_MISSING}")
1482 message (STATUS "It can be interesting to install them (especially if you're a maintainer of Cairo-Dock's packages).")
1483 endif ()
1484
1485 if (NOT "${PROGRAMS_MISSING}" STREQUAL "")
1486 message ("")
1487 message (STATUS "WARNING: It seems that one (or more) program(s) or package(s) is (are) missing:${PROGRAMS_MISSING}")
1488 message (STATUS "It can be interesting to install them (especially if you're a maintainer of Cairo-Dock's packages).")
1489 endif ()
1490
1491 if (NOT "${MODULES_INTEGRATION_MISSING}" STREQUAL "")
1492 message ("")
1493 message (STATUS "WARNING: It seems that one (or more) module(s) for the integration with the system is (are) missing:${MODULES_INTEGRATION_MISSING}")
1494 message (STATUS "It's maybe not required for the user but it's recommended to install them if you're a maintainer of Cairo-Dock's packages.")
1495 endif ()
1496 message ("")