1
########### requirements ###############
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")
11
########### project ###############
13
project ("cairo-dock-plugins")
16
add_definitions (-std=c99 -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)
20
add_definitions (-DGL_GLEXT_PROTOTYPES="1")
22
############ sources tarball #############
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$;/misc/;~$;${CPACK_SOURCE_IGNORE_FILES}")
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})
36
############ uninstall #############
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")
41
########### global variables ###############
44
message(FATAL_ERROR "Cairo-Dock requires an air-conditioned room. Please close Windows!")
47
set (PACKAGE ${CMAKE_PROJECT_NAME})
48
set (GETTEXT_PACKAGE ${PACKAGE})
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})
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})
60
MESSAGE (FATAL_ERROR "Error: version mismatch with the core: ${VERSION} <> ${dock_version}")
64
set (dock_version ${VERSION}) # should be the same except if PACKAGEMENT is set
66
# get plug-ins install dir
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
73
COMMAND pkg-config gldi --variable=pluginsdatadir # /usr/share/cairo-dock/plug-ins
74
OUTPUT_VARIABLE pluginsdatadir)
75
STRING (REGEX REPLACE "\n" "" pluginsdatadir ${pluginsdatadir})
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)
83
COMMAND pkg-config gldi --variable=gtkversion # 2 or 3
84
OUTPUT_VARIABLE gtkversion)
85
STRING (REGEX REPLACE "\n" "" gtkversion ${gtkversion})
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(datadir "${pluginsdatadir}/../.." ABSOLUTE) # /usr/share
90
if (NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "${prefix}"
91
OR NOT "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" STREQUAL "${libdir}"
92
OR NOT "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}" STREQUAL "${datadir}")
93
message (STATUS "It seems that the current CMAKE_INSTALL_{PREFIX,LIBDIR,DATAROOTDIR} flags are not the same that you have used with the core.")
94
message (STATUS " It will be replaced by this value: ${prefix}")
95
message (WARNING "Plug-ins should be installed in the same directory as the core, that is to say in ${pluginsdir}")
96
set (CMAKE_INSTALL_PREFIX "${prefix}")
97
#set (libdir "${CMAKE_INSTALL_PREFIX}/${libname}/cairo-dock")
100
# set internationalisation
101
set (GETTEXT_PLUGINS "cairo-dock-plugins")
102
set (localedir "${prefix}/${CMAKE_INSTALL_LOCALEDIR}")
103
set (gaugesdir "${datadir}/cairo-dock/gauges")
105
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/") # additionnal FindPackage files
107
set (MODULES_MISSING "")
108
set (MODULES_INTEGRATION_MISSING "")
109
set (PROGRAMS_MISSING "")
112
########### Misc ###############
113
macro (enable_if_not_defined MODULE1)
114
if (NOT DEFINED ${MODULE1}) # true if not defined
115
set (${MODULE1} TRUE)
117
endmacro (enable_if_not_defined)
120
########## Config ###############
122
enable_if_not_defined (force-icon-in-menus)
123
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.
124
add_definitions (-DCAIRO_DOCK_FORCE_ICON_IN_MENUS=1)
126
add_definitions (-DCAIRO_DOCK_FORCE_ICON_IN_MENUS=0)
130
########### dependancies ###############
133
message (STATUS "=====================")
134
message (STATUS "Check dependencies...")
135
message (STATUS "=====================")
138
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.
139
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
# add_definitions (-DGTK_DISABLE_DEPRECATED="1")
143
############# GLIB #################
144
pkg_check_modules (GLIB glib-2.0)
145
STRING (REGEX REPLACE "\\..*" "" GLIB_MAJOR "${GLIB_VERSION}") # 2.28.3 => 2
146
STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" GLIB_MINOR "${GLIB_VERSION}") # 2.28.3 => 2.28
147
STRING (REGEX REPLACE "\\.[0-9]*" "" GLIB_MINOR "${GLIB_MINOR}") # 2.28 => 28
148
STRING (REGEX REPLACE ".*\\." "" GLIB_NANO "${GLIB_VERSION}") # 2.28.3 => 3
149
STRING (REGEX REPLACE "-.*" "" GLIB_NANO "${GLIB_NANO}")
151
############# SHARED-FILES #################
152
set (shared_filesdatadir "${pluginsdatadir}/shared-files")
153
add_subdirectory (shared-files)
155
############# STATIC LIBRARIES ################
156
message (STATUS "> Static Libraries:")
158
############# GVFS-INTEGRATION ################
159
message (STATUS "> GVFS-Integration:")
160
pkg_check_modules ("LIBGIO" "gio-2.0") ## GIO is used by a few applets: do not offer the possibility to not disable it
161
add_subdirectory (gvfs-integration)
163
############# INDICATOR-APPLET #################
164
message (STATUS "> Indicator-Applet:")
165
enable_if_not_defined (enable-dbusmenu-support)
166
if (enable-dbusmenu-support)
167
# Note: the names of dbusmenu-glib, dbusmenu-gtk and indicator have changed...
169
set (DBUSMENU_MODULE dbusmenu-glib-0.4)
170
pkg_check_modules (DBUSMENU ${DBUSMENU_MODULE})
171
if (NOT DBUSMENU_FOUND)
172
set (DBUSMENU_MODULE dbusmenu-glib)
173
pkg_check_modules (DBUSMENU ${DBUSMENU_MODULE})
174
set (INDICATOR_APPLICATIONADDED_HAS_HINT 0) # doesn't have 'hint' with old version
176
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
180
if (gtkversion EQUAL 2)
181
set (DBUSMENU_GTK_MODULE dbusmenu-gtk-0.4)
183
set (DBUSMENU_GTK_MODULE dbusmenu-gtk3-0.4)
185
pkg_check_modules (DBUSMENU_GTK ${DBUSMENU_GTK_MODULE})
186
if (NOT DBUSMENU_GTK_FOUND)
187
if (gtkversion EQUAL 2)
188
set (DBUSMENU_GTK_MODULE dbusmenu-gtk)
190
set (DBUSMENU_GTK_MODULE dbusmenu-gtk3)
192
pkg_check_modules (DBUSMENU_GTK ${DBUSMENU_GTK_MODULE})
197
enable_if_not_defined (enable-indicator-support)
198
if (enable-indicator-support)
199
if (gtkversion EQUAL 2)
200
set (INDICATOR_APPLET_MODULE indicator-0.4)
202
set (INDICATOR_APPLET_MODULE indicator3-0.4)
204
pkg_check_modules (INDICATOR_APPLET ${INDICATOR_APPLET_MODULE})
205
if (INDICATOR_APPLET_FOUND)
206
set (INDICATOR_NEW_VERSION TRUE) # oneiric and newer
208
if (gtkversion EQUAL 2)
209
set (INDICATOR_APPLET_MODULE indicator)
211
set (INDICATOR_APPLET_MODULE indicator3)
213
pkg_check_modules (INDICATOR_APPLET ${INDICATOR_APPLET_MODULE})
218
enable_if_not_defined (enable-libido-support)
219
if (enable-libido-support)
220
if (gtkversion EQUAL 2)
221
set (IDO_MODULE libido-0.1)
223
set (IDO_MODULE libido3-0.1)
225
pkg_check_modules (IDO ${IDO_MODULE})
227
STRING (REGEX REPLACE "\\..*" "" IDO_MAJOR "${IDO_VERSION}")
228
STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" IDO_MINOR "${IDO_VERSION}") # 0.1.7 => 1.7
229
STRING (REGEX REPLACE "\\.[0-9]*" "" IDO_MINOR "${IDO_MINOR}")
230
if (${IDO_MAJOR} GREATER 13
231
OR ${IDO_MAJOR} EQUAL 13 AND ${IDO_MINOR} GREATER 9)
237
## Extract versions of DBusMenu
238
if (DBUSMENU_FOUND AND DBUSMENU_GTK_FOUND)
239
STRING (REGEX REPLACE "\\..*" "" DBUSMENU_MAJOR "${DBUSMENU_VERSION}")
240
STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" DBUSMENU_MINOR "${DBUSMENU_VERSION}") # 0.1.7 => 1.7
241
STRING (REGEX REPLACE "\\.[0-9]*" "" DBUSMENU_MINOR "${DBUSMENU_MINOR}")
242
STRING (REGEX REPLACE ".*\\." "" DBUSMENU_NANO "${DBUSMENU_VERSION}")
243
STRING (REGEX REPLACE "-.*" "" DBUSMENU_NANO "${DBUSMENU_NANO}")
245
STRING (REGEX REPLACE "\\..*" "" DBUSMENU_GTK_MAJOR "${DBUSMENU_GTK_VERSION}")
246
STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" DBUSMENU_GTK_MINOR "${DBUSMENU_GTK_VERSION}") # 0.1.7 => 1.7
247
STRING (REGEX REPLACE "\\.[0-9]*" "" DBUSMENU_GTK_MINOR "${DBUSMENU_GTK_MINOR}")
248
STRING (REGEX REPLACE ".*\\." "" DBUSMENU_GTK_NANO "${DBUSMENU_GTK_VERSION}")
249
STRING (REGEX REPLACE "-.*" "" DBUSMENU_GTK_NANO "${DBUSMENU_GTK_NANO}")
251
if (${DBUSMENU_GTK_MAJOR} GREATER 0 OR ${DBUSMENU_GTK_MINOR} GREATER 5
252
OR (${DBUSMENU_GTK_MINOR} EQUAL 5 AND ${DBUSMENU_GTK_NANO} GREATER 89))
253
set (DBUSMENU_GTK3_NEW 1)
254
set (INDICATOR_APPLICATIONADDED_HAS_TITLE 1) # Status-Notifier: new parameter "Title" in the "added" signal since Precise
256
set (INDICATOR_APPLICATIONADDED_HAS_TITLE 0)
260
## Extract version of indicator
261
if (INDICATOR_APPLET_FOUND)
262
STRING (REGEX REPLACE "\\..*" "" INDICATOR_MAJOR "${INDICATOR_APPLET_VERSION}")
263
STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" INDICATOR_MINOR "${INDICATOR_APPLET_VERSION}") # 0.1.7 => 1.7
264
STRING (REGEX REPLACE "\\.[0-9]*" "" INDICATOR_MINOR "${INDICATOR_MINOR}")
265
STRING (REGEX REPLACE ".*\\." "" INDICATOR_NANO "${INDICATOR_APPLET_VERSION}")
266
STRING (REGEX REPLACE "-.*" "" INDICATOR_NANO "${INDICATOR_NANO}")
268
if (${INDICATOR_MAJOR} GREATER 0 OR ${INDICATOR_MINOR} GREATER 4
269
OR (${INDICATOR_MINOR} EQUAL 4 AND ${INDICATOR_NANO} GREATER 89))
270
set (SOUND_SERVICE_VERSION 1) # Sound-Menu: new DBus path
271
set (INDICATOR_MESSAGES_HAS_LOZENGE 1) # Messaging Menu has 'right-is-lozenge'
272
else() # older than Precise.
273
set (SOUND_SERVICE_VERSION 0)
274
set (INDICATOR_MESSAGES_HAS_LOZENGE 0)
277
if (INDICATOR_NEW_VERSION) # oneiric and newer
278
if (gtkversion EQUAL 2)
280
COMMAND pkg-config --variable=iconsdir indicator-0.4
281
OUTPUT_VARIABLE INDICATORICONSDIR)
284
COMMAND pkg-config --variable=iconsdir indicator3-0.4
285
OUTPUT_VARIABLE INDICATORICONSDIR)
287
COMMAND pkg-config --variable=indicatordir indicator3-0.4
288
OUTPUT_VARIABLE INDICATORDIR)
289
STRING (REGEX REPLACE "\n" "" INDICATORDIR ${INDICATORDIR})
290
set (with_indicator3 yes)
291
message (STATUS " Indicators: with Indicator3 support")
294
if (gtkversion EQUAL 2)
296
COMMAND pkg-config --variable=iconsdir indicator
297
OUTPUT_VARIABLE INDICATORICONSDIR)
300
COMMAND pkg-config --variable=iconsdir indicator3
301
OUTPUT_VARIABLE INDICATORICONSDIR)
304
STRING (REGEX REPLACE "\n" "" INDICATORICONSDIR "${INDICATORICONSDIR}") # la commande rajoute un retour chariot ...
306
add_subdirectory (Indicator-applet3)
308
## DBusMenu is needed for Indicator-applet
309
if (DBUSMENU_FOUND AND DBUSMENU_GTK_FOUND)
310
add_subdirectory (Indicator-applet)
311
set (with_indicator "yes")
315
if (NOT DBUSMENU_FOUND OR NOT DBUSMENU_GTK_FOUND OR NOT INDICATOR_APPLET_FOUND)
316
message (WARNING "These modules are required to compile Indicators applet (MeMenu, 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)")
317
set (MODULES_MISSING "${MODULES_MISSING} ${INDICATOR_APPLET_MODULE}(-0.4) (${IDO_MODULE}) ${DBUSMENU_MODULE}(-0.4) ${DBUSMENU_GTK_MODULE}(-0.4)")
320
############# INDICATOR-NAME #################
321
message (STATUS "> Indicator Names:")
322
set (INDICATOR_OLD_NAMES 0)
323
if (force_old_indicator_names)
324
set (INDICATOR_OLD_NAMES 1)
325
message (STATUS " Indicators: use old Ayatana Dbus names (forced)")
326
#~ elseif ("${DISTRO_ID}" STREQUAL "Ubuntu")
327
#~ STRING (REGEX REPLACE "\\..*" "" DISTRO_RELEASE_MAJOR ${DISTRO_RELEASE})
328
#~ # message (STATUS "DISTRO_RELEASE_MAJOR: ${DISTRO_RELEASE_MAJOR}")
329
#~ if (${DISTRO_RELEASE_MAJOR} LESS 11) # from 11.04, new names are used.
330
#~ set (INDICATOR_OLD_NAMES 1)
331
#~ message (STATUS " Indicators: use old Ayatana Dbus names")
333
elseif (INDICATOR_APPLET_FOUND)
334
if (NOT (${INDICATOR_MAJOR} GREATER 0 OR ${INDICATOR_MINOR} GREATER 3 OR (${INDICATOR_MINOR} EQUAL 3 AND ${INDICATOR_NANO} GREATER 20)))
335
set (INDICATOR_OLD_NAMES 1) # maverick or older
336
message (STATUS " Indicators: use old Ayatana Dbus names")
340
############# DISTRIBUTION #################
341
message (STATUS "> Distribution:")
342
# We try to detect if the user is on Ubuntu to know which bus we have to use...
344
COMMAND lsb_release -i
345
OUTPUT_VARIABLE DISTRO_ID) # -> "Distributor ID: Ubuntu"
346
if (NOT "${DISTRO_ID}" STREQUAL "") # this tool isn't available on all distributions
347
STRING (REGEX REPLACE "\n" "" DISTRO_ID ${DISTRO_ID}) # retour chariot
348
STRING (REGEX REPLACE ".*: *\t*" "" DISTRO_ID ${DISTRO_ID})
351
COMMAND lsb_release -r
352
OUTPUT_VARIABLE DISTRO_RELEASE) # -> "Release: 10.10"
353
STRING (REGEX REPLACE "\n" "" DISTRO_RELEASE ${DISTRO_RELEASE}) # retour chariot
354
STRING (REGEX REPLACE ".*: *\t*" "" DISTRO_RELEASE ${DISTRO_RELEASE})
356
# on Ubuntu deb builders, lsb_release isn't available but we can have a look to /etc/issue.net
357
get_filename_component(ISSUE_NET "/etc/issue.net" ABSOLUTE)
358
if (EXISTS ${ISSUE_NET}) # to not have an error with cat
360
COMMAND cat ${ISSUE_NET}
361
OUTPUT_VARIABLE DISTRO_RELEASE) # -> Ubuntu 10.10 || Ubuntu natty (development branch)
362
if (NOT "${DISTRO_RELEASE}" STREQUAL "")
363
STRING (REGEX REPLACE "\n" "" DISTRO_RELEASE ${DISTRO_RELEASE}) # retour chariot
364
STRING (REGEX REPLACE " (.+)" "" DISTRO_ID ${DISTRO_RELEASE})
365
if ("${DISTRO_ID}" STREQUAL "Ubuntu")
366
STRING (REGEX REPLACE ".[(]development branch[)]" "" DISTRO_RELEASE ${DISTRO_RELEASE})
367
STRING (REGEX REPLACE ".LTS" "" DISTRO_RELEASE ${DISTRO_RELEASE}) # Ubuntu 10.04.1 LTS
368
STRING (REGEX REPLACE "(.+) " "" DISTRO_RELEASE ${DISTRO_RELEASE})
369
if ("${DISTRO_RELEASE}" STREQUAL "natty")
370
set (DISTRO_RELEASE "11.04")
371
elseif ("${DISTRO_RELEASE}" STREQUAL "oneiric")
372
set (DISTRO_RELEASE "11.10")
373
elseif ("${DISTRO_RELEASE}" STREQUAL "precise")
374
set (DISTRO_RELEASE "12.04")
381
if (NOT "${DISTRO_ID}" STREQUAL "")
382
message (STATUS " DISTRO_ID: ${DISTRO_ID}, DISTRO_RELEASE: ${DISTRO_RELEASE}")
385
############# SHARED LIBRARIES ###########
386
message (STATUS "> Shared Libraries:")
388
############# ALSA_MIXER #################
389
message (STATUS "> AlsaMixer:")
391
set (with_soundmenu no)
392
enable_if_not_defined (enable-alsa-mixer)
393
if (enable-alsa-mixer)
394
pkg_check_modules (ALSA_MIXER_PACKAGE alsa)
395
if (NOT ALSA_MIXER_PACKAGE_FOUND)
396
message (STATUS "Could not find alsa; Cairo-Dock won't be built with AlsaMixer applet.")
397
message (WARNING "This module is required to compile AlsaMixer applet: alsa")
398
set (MODULES_MISSING "${MODULES_MISSING} alsa")
400
set (GETTEXT_ALSA_MIXER ${GETTEXT_PLUGINS})
401
set (VERSION_ALSA_MIXER "2.1.4")
402
set (PACKAGE_ALSA_MIXER "cd-AlsaMixer")
404
set (alsa_mixerdatadir "${pluginsdatadir}/AlsaMixer")
405
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/alsaMixer/data/AlsaMixer.conf.in ${CMAKE_CURRENT_BINARY_DIR}/alsaMixer/data/AlsaMixer.conf)
407
set (INDICATOR_SOUNDMENU_WITH_IND3 TRUE) # If it's supported, it's maybe better to use it
408
set (with_soundmenu yes)
409
elseif (with_indicator AND IDO_FOUND
410
AND "${INDICATOR_OLD_NAMES}" STREQUAL "0")
411
set (with_soundmenu yes)
413
add_subdirectory ("alsaMixer")
417
############# ANIMATED ICONS #################
418
message (STATUS "> Animated Icons:")
419
set (GETTEXT_ANIMATED_ICONS ${GETTEXT_PLUGINS})
420
set (VERSION_ANIMATED_ICONS "1.0.12")
421
set (PACKAGE_ANIMATED_ICONS "cd-Animated-icons")
422
set (animated_iconsdatadir "${pluginsdatadir}/Animated-icons")
423
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Animated-icons/data/Animated-icons.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Animated-icons/data/Animated-icons.conf)
424
add_subdirectory (Animated-icons)
426
############# CAIRO_PENGUIN #################
427
message (STATUS "> Cairo Penguin:")
428
set (GETTEXT_CAIRO_PENGUIN ${GETTEXT_PLUGINS})
429
set (VERSION_CAIRO_PENGUIN "1.1.12")
430
set (PACKAGE_CAIRO_PENGUIN "cd-Cairo-Penguin")
431
set (cairo_penguinuserdirname "Cairo-Penguin")
432
set (cairo_penguindatadir "${pluginsdatadir}/Cairo-Penguin")
433
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Cairo-Penguin/data/Cairo-Penguin.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Cairo-Penguin/data/Cairo-Penguin.conf)
434
add_subdirectory (Cairo-Penguin)
436
############# CLIPPER #################
437
message (STATUS "> Clipper:")
438
set (GETTEXT_CLIPPER ${GETTEXT_PLUGINS})
439
set (VERSION_CLIPPER "1.1.8")
440
set (PACKAGE_CLIPPER "cd-Clipper")
441
set (Clipperdatadir "${pluginsdatadir}/Clipper")
442
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Clipper/data/Clipper.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Clipper/data/Clipper.conf)
443
add_subdirectory (Clipper)
445
############# CLOCK #################
446
message (STATUS "> Clock:")
447
enable_if_not_defined (enable-ical-support)
449
if (enable-ical-support)
450
pkg_check_modules ("LIBICAL_PACKAGE" "libical")
451
if (NOT LIBICAL_PACKAGE_FOUND)
452
message (STATUS "Could not find libical; Clock plugin won't be built with iCal support.")
453
message (WARNING "This module is required to compile Clock applet with iCal support: libical")
454
set (MODULES_MISSING "${MODULES_MISSING} libical")
459
set (GETTEXT_CLOCK ${GETTEXT_PLUGINS})
460
set (VERSION_CLOCK "2.2.2")
461
set (PACKAGE_CLOCK "cd-clock")
462
set (clockuserdirname "clock")
463
set (clockdatadir "${pluginsdatadir}/clock")
464
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/clock/data/clock.conf.in ${CMAKE_CURRENT_BINARY_DIR}/clock/data/clock.conf)
465
add_subdirectory (clock)
467
############# COMPOSITE_MANAGER #################
468
message (STATUS "> Composite Manager:")
469
set (GETTEXT_COMPOSITE_MANAGER ${GETTEXT_PLUGINS})
470
set (VERSION_COMPOSITE_MANAGER "1.0.3")
471
set (PACKAGE_COMPOSITE_MANAGER "cd-Composite-Manager")
472
set (composite_managerdatadir "${pluginsdatadir}/Composite-Manager")
473
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Composite-Manager/data/Composite-Manager.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Composite-Manager/data/Composite-Manager.conf)
474
add_subdirectory (Composite-Manager)
476
############# DBUS #################
477
message (STATUS "> DBus:")
479
set (with_python2 no)
480
set (with_python3 no)
481
enable_if_not_defined (enable-python-interface)
482
if (enable-python-interface)
483
message (STATUS " * Python:")
484
# find python executables
485
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')
486
if (PYTHON2_EXECUTABLE AND EXISTS ${PYTHON2_EXECUTABLE})
487
set (PYTHON2_FOUND TRUE)
488
set (with_python2 yes)
490
find_program (PYTHON3_EXECUTABLE python3)
491
if (PYTHON3_EXECUTABLE AND EXISTS ${PYTHON3_EXECUTABLE})
492
set (PYTHON3_FOUND TRUE)
493
set (with_python3 yes)
495
if (NOT PYTHON2_FOUND OR NOT PYTHON3_FOUND) # if we didn't find one of them,
496
find_program (PYTHON_EXECUTABLE python)
497
if (PYTHON_EXECUTABLE AND EXISTS ${PYTHON_EXECUTABLE})
498
EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c
499
"from __future__ import print_function; import sys; print(sys.version)"
500
OUTPUT_VARIABLE PYTHON_VERSION)
501
STRING (REGEX REPLACE "\\..*" "" PYTHON_VERSION ${PYTHON_VERSION})
502
message (STATUS " Python Version: ${PYTHON_VERSION}")
503
if ("${PYTHON_VERSION}" STREQUAL "2")
504
set (PYTHON2_EXECUTABLE ${PYTHON_EXECUTABLE})
505
set (PYTHON2_FOUND TRUE)
506
set (with_python2 yes)
507
elseif ("${PYTHON_VERSION}" STREQUAL "3")
508
set (PYTHON3_EXECUTABLE ${PYTHON_EXECUTABLE})
509
set (PYTHON3_FOUND TRUE)
510
set (with_python3 yes)
515
# see if we found anything
516
if (NOT PYTHON2_FOUND AND NOT PYTHON3_FOUND)
517
message (STATUS "Could not find Python, won't install Python interface.")
518
message (WARNING "This program is required to compile DBus applet with Python interface: python (version 2)")
519
set (PROGRAMS_MISSING "${PROGRAMS_MISSING} python")
521
message (STATUS " Python executable program(s): ${PYTHON2_EXECUTABLE} ; ${PYTHON3_EXECUTABLE}")
522
GET_FILENAME_COMPONENT(DEBIAN_VERSION /etc/debian_version ABSOLUTE)
523
if (EXISTS ${DEBIAN_VERSION})
524
message (STATUS " will use '--install-layout deb' with 'python setup.py install'")
525
set (DEBIAN_INSTALL_LAYOUT "--install-layout deb")
527
set (with_python yes)
531
enable_if_not_defined (enable-ruby-interface)
532
if (enable-ruby-interface)
533
message (STATUS " * Ruby:")
534
# find_package(Ruby) found libs of ruby-dev but we only need a directory where we can install ruby libs.
535
find_program (RUBY_EXECUTABLE ruby)
536
EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['rubylibdir']"
537
OUTPUT_VARIABLE RUBY_LIB_DIR)
538
message (STATUS " Ruby library dir: ${RUBY_LIB_DIR}")
539
if ("${RUBY_LIB_DIR}" STREQUAL "" OR "${RUBY_LIB_DIR}" STREQUAL "nil")
540
message (STATUS "Could not find ruby libs, won't install Ruby interface.")
541
message (WARNING "This program is required to compile DBus applet with Ruby interface: ruby")
542
set (PROGRAMS_MISSING "${PROGRAMS_MISSING} ruby")
545
# /usr/lib/ruby/1.8 or /usr/lib/ruby/1.9.1
546
string (REGEX REPLACE "lib/ruby/[0-9].[0-9]?.+" "" RUBY_LIB_DIR_INSTALL "${RUBY_LIB_DIR}")
547
string (REGEX REPLACE "${RUBY_LIB_DIR_INSTALL}" "" RUBY_LIB_DIR_INSTALL "${RUBY_LIB_DIR}")
548
set (RUBY_LIB_DIR "${CMAKE_INSTALL_PREFIX}/${RUBY_LIB_DIR_INSTALL}")
549
message (STATUS " will be installed in: ${RUBY_LIB_DIR}")
550
set (RUBY_FOUND "TRUE")
556
enable_if_not_defined (enable-mono-interface)
557
if (enable-mono-interface)
558
message (STATUS " * Mono:")
560
find_program (GMCS_EXECUTABLE gmcs)
561
if (NOT GMCS_EXECUTABLE OR NOT EXISTS ${GMCS_EXECUTABLE})
562
message (STATUS "Could not find Mono compiler gmcs, won't build Mono interface.")
564
pkg_check_modules (MONO_PACKAGE glib-sharp-2.0 ndesk-dbus-1.0 ndesk-dbus-glib-1.0)
565
if (NOT MONO_PACKAGE_FOUND)
566
message (STATUS "Could not find glib-sharp-2.0, ndesk-dbus-1.0 or ndesk-dbus-glib-1.0; won't be built Mono interface.")
567
message (WARNING "These modules are required to compile DBus applet with Mono interface: glib-sharp-2.0, ndesk-dbus-1.0 and ndesk-dbus-glib-1.0")
568
set (MODULES_MISSING "${MODULES_MISSING} glib-sharp-2.0 ndesk-dbus-1.0 ndesk-dbus-glib-1.0")
570
set (MONO_FOUND TRUE)
578
enable_if_not_defined (enable-vala-interface)
579
if (enable-vala-interface)
580
message (STATUS " * Vala:")
581
# Valac is only required to convert vala files to C files.
582
# So we can directly use produced files (c, h, vapi) without using valac.
585
find_program (VALAC_EXE valac)
586
message (STATUS " Path to valac: ${VALAC_EXE}")
588
enable_if_not_defined (enable-vala-support)
589
if (NOT enable-vala-support)
592
elseif (${GLIB_MAJOR} LESS 3 AND ${GLIB_MINOR} LESS 26)
594
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 !
595
execute_process(COMMAND ${VALAC_EXE} "--version"
596
OUTPUT_VARIABLE "VALA_VERSION")
597
string(REPLACE "Vala" "" "VALA_VERSION" ${VALA_VERSION})
598
string(STRIP ${VALA_VERSION} "VALA_VERSION")
599
message (STATUS " Vala version: ${VALA_VERSION}")
601
STRING (REGEX REPLACE "\\..*" "" VALA_MAJOR "${VALA_VERSION}")
602
# message (STATUS "VALA_MAJOR : ${VALA_MAJOR}")
604
STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" VALA_MINOR "${VALA_VERSION}") # 0.1.7 => 1.7
605
STRING (REGEX REPLACE "\\.[0-9]*" "" VALA_MINOR "${VALA_MINOR}")
606
# message (STATUS "VALA_MINOR : ${VALA_MINOR}")
608
STRING (REGEX REPLACE ".*\\." "" VALA_NANO "${VALA_VERSION}")
609
STRING (REGEX REPLACE "-.*" "" VALA_NANO "${VALA_NANO}")
610
# message (STATUS "VALA_NANO : ${VALA_NANO}")
612
if (${VALA_MAJOR} GREATER 0 OR ${VALA_MINOR} GREATER 9) # vala >= 0.10
613
# AND (${VALA_MAJOR} LESS 1 AND ${VALA_MINOR} LESS 13)) # and <= 0.12
614
message (STATUS " Vala compiler OK (>= 0.10).")# and <= 0.12).")
615
set (VALAC_FOUND TRUE)
618
message (STATUS " Vala compiler is too old (0.10 required) or too new (> 0.12), won't build Vala interface.")
621
message (STATUS "Could not find ValaC, won't build Vala interface with the version of your distribution.")
622
message (WARNING "This program is required to compile DBus applet with Vala interface: valac (version > 0.10)")
623
set (PROGRAMS_MISSING "${PROGRAMS_MISSING} valac")
628
set (GETTEXT_DBUS ${GETTEXT_PLUGINS})
629
set (VERSION_DBUS "1.2.2")
630
set (PACKAGE_DBUS "cd-Dbus")
631
set (dbusdatadir "${pluginsdatadir}/Dbus")
632
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Dbus/data/Dbus.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Dbus/data/Dbus.conf)
633
add_subdirectory (Dbus)
635
############# DESKLET_RENDERING #################
636
message (STATUS "> Desklet Rendering:")
637
set (GETTEXT_DESKLET_RENDERING ${GETTEXT_PLUGINS})
638
set (VERSION_DESKLET_RENDERING "1.5.7")
639
set (PACKAGE_DESKLET_RENDERING "cd-desklet-rendering")
640
set (desklet_renderingdatadir "${pluginsdatadir}/desklet-rendering")
641
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/desklet-rendering/data/desklet-rendering.conf.in ${CMAKE_CURRENT_BINARY_DIR}/desklet-rendering/data/desklet-rendering.conf)
642
add_subdirectory (desklet-rendering)
644
############# DIALOG_RENDERING #################
645
message (STATUS "> Dialog Rendering:")
646
set (GETTEXT_DIALOG_RENDERING ${GETTEXT_PLUGINS})
647
set (VERSION_DIALOG_RENDERING "0.5.2")
648
set (PACKAGE_DIALOG_RENDERING "cd-dialog-rendering")
649
set (dialog_renderingdatadir "${pluginsdatadir}/dialog-rendering")
650
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/dialog-rendering/data/dialog-rendering.conf.in ${CMAKE_CURRENT_BINARY_DIR}/dialog-rendering/data/dialog-rendering.conf)
651
add_subdirectory (dialog-rendering)
653
############# DISKS #################
654
set (with_disks no) # unstable
656
message (STATUS "> Disks:")
657
set (GETTEXT_DISKS ${GETTEXT_PLUGINS})
658
set (VERSION_DISKS "0.0.6")
659
set (PACKAGE_DISKS "cd-disks")
661
set (disksdatadir "${pluginsdatadir}/Disks")
662
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Disks/data/Disks.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Disks/data/Disks.conf)
663
add_subdirectory ("Disks")
666
############# DND2SHARE #################
667
message (STATUS "> DND2Share:")
668
set (GETTEXT_DND2SHARE ${GETTEXT_PLUGINS})
669
set (VERSION_DND2SHARE "1.0.10")
670
set (PACKAGE_DND2SHARE "cd-dnd2share")
671
set (dnd2sharedatadir "${pluginsdatadir}/dnd2share")
672
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/dnd2share/data/dnd2share.conf.in ${CMAKE_CURRENT_BINARY_DIR}/dnd2share/data/dnd2share.conf)
673
add_subdirectory (dnd2share)
675
############# DOCK RENDERING #################
676
message (STATUS "> Dock Rendering:")
677
set (GETTEXT_RENDERING ${GETTEXT_PLUGINS})
678
set (VERSION_RENDERING "1.5.10")
679
set (PACKAGE_RENDERING "cd-rendering")
680
set (renderingdatadir "${pluginsdatadir}/rendering")
681
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/dock-rendering/data/rendering.conf.in ${CMAKE_CURRENT_BINARY_DIR}/dock-rendering/data/rendering.conf)
682
add_subdirectory (dock-rendering)
684
############# DONCKY #################
685
set (with_doncky no) # unstable
687
message (STATUS "> Doncky:")
688
set (GETTEXT_DONCKY ${GETTEXT_PLUGINS})
689
set (VERSION_DONCKY "0.0.8")
690
set (PACKAGE_DONCKY "cd-doncky")
691
set (with_doncky yes)
692
set (donckydatadir "${pluginsdatadir}/Doncky")
693
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Doncky/data/Doncky.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Doncky/data/Doncky.conf)
694
add_subdirectory (Doncky)
697
############# DROP INDICATOR #################
698
message (STATUS "> Drop Indicator:")
699
set (GETTEXT_DROP_INDICATOR ${GETTEXT_PLUGINS})
700
set (VERSION_DROP_INDICATOR "1.1.6")
701
set (PACKAGE_DROP_INDICATOR "cd-drop_indicator")
702
set (drop_indicatordatadir "${pluginsdatadir}/drop-indicator")
703
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/drop-indicator/data/drop_indicator.conf.in ${CMAKE_CURRENT_BINARY_DIR}/drop-indicator/data/drop_indicator.conf)
704
add_subdirectory (drop-indicator)
706
############# DUSTBIN #################
707
message (STATUS "> Dustbin:")
708
set (GETTEXT_DUSTBIN ${GETTEXT_PLUGINS})
709
set (VERSION_DUSTBIN "2.3.5")
710
set (PACKAGE_DUSTBIN "cd-dustbin")
711
set (dustbinuserdirname "dustbin")
712
set (dustbindatadir "${pluginsdatadir}/dustbin")
713
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/dustbin/data/dustbin.conf.in ${CMAKE_CURRENT_BINARY_DIR}/dustbin/data/dustbin.conf)
714
add_subdirectory (dustbin)
716
############# FOLDERS #################
717
message (STATUS "> Folders:")
718
set (GETTEXT_FOLDERS ${GETTEXT_PLUGINS})
719
set (VERSION_FOLDERS "0.2.5")
720
set (PACKAGE_FOLDERS "cd-Folders")
721
set (foldersdatadir "${pluginsdatadir}/Folders")
722
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Folders/data/Folders.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Folders/data/Folders.conf)
723
add_subdirectory (Folders)
725
############# GLOBAL-MENU #################
726
set (with_global_menu no) # unstable
727
if (enable-global-menu AND "${INDICATOR_OLD_NAMES}" STREQUAL "0" AND DBUSMENU_FOUND AND DBUSMENU_GTK_FOUND) # currently only supported with new name of the indicator module and with newer version of dbusmenu
728
message (STATUS "> Global-Menu:")
729
set (GETTEXT_GLOBAL_MENU ${GETTEXT_PLUGINS})
730
set (VERSION_GLOBAL_MENU "0.1.2")
731
set (PACKAGE_GLOBAL_MENU "cd-Global-Menu")
732
set (with_global_menu yes)
733
set (global_menudatadir "${pluginsdatadir}/Global-Menu")
734
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Global-Menu/data/Global-Menu.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Global-Menu/data/Global-Menu.conf)
735
add_subdirectory (Global-Menu)
738
############# GMENU #################
739
message (STATUS "> GMenu:")
741
enable_if_not_defined (enable-gmenu)
743
set (GMENU_MODULE "libgnome-menu-3.0")
744
set (GMENU_MODULE_OLD "libgnome-menu")
745
pkg_check_modules (GMENU_PACKAGE ${GMENU_MODULE})
746
if (NOT GMENU_PACKAGE_FOUND)
747
message (STATUS "Could not find ${GMENU_MODULE}; trying with an old version...")
748
pkg_check_modules (GMENU_PACKAGE ${GMENU_MODULE_OLD})
751
if (NOT GMENU_PACKAGE_FOUND)
752
message (STATUS "Could not find ${GMENU_MODULE} nor ${GMENU_MODULE_OLD}; Cairo-Dock won't be built with GMenu applet.")
753
message (WARNING "This module is required to compile GMenu applet: ${GMENU_MODULE} (or ${GMENU_MODULE_OLD})")
754
set (MODULES_MISSING "${MODULES_MISSING} ${GMENU_MODULE}")
756
set (GETTEXT_GMENU ${GETTEXT_PLUGINS})
758
set (VERSION_GMENU "1.1.11")
759
set(GMENU_SRC "GMenu-old")
760
set (with_gmenu "yes (old version)")
762
set (VERSION_GMENU "2.0.0")
763
set(GMENU_SRC "GMenu")
764
set (with_gmenu "yes (new version)")
766
set (PACKAGE_GMENU "cd-GMenu")
767
set (gmenudatadir "${pluginsdatadir}/GMenu")
768
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/${GMENU_SRC}/data/GMenu.conf.in ${CMAKE_CURRENT_BINARY_DIR}/${GMENU_SRC}/data/GMenu.conf)
769
add_subdirectory (${GMENU_SRC})
773
############# GNOME-INTEGRATION #################
774
message (STATUS "> Gnome-Integration:")
775
set (with_gnome_integration no)
776
enable_if_not_defined (enable-gnome-integration)
777
if (enable-gnome-integration)
778
pkg_check_modules (GNOME_INTEGRATION gio-2.0)
779
if (NOT GNOME_INTEGRATION_FOUND)
780
message (STATUS "Could not find gio; Cairo-Dock won't be built with Gnome>=2.22 support.")
781
message (STATUS "This module is required to compile Gnome-Integration applet: gio-2.0")
782
set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} gio-2.0")
784
set (GETTEXT_GNOME_INTEGRATION ${GETTEXT_PLUGINS})
785
set (VERSION_GNOME_INTEGRATION "1.0.4")
786
set (PACKAGE_GNOME_INTEGRATION "cd_gnome-integration")
787
set (with_gnome_integration yes)
788
set (gnome_integrationdatadir "${pluginsdatadir}/gnome-integration")
789
add_subdirectory ("gnome-integration")
793
############# GNOME-INTEGRATION-OLD #################
794
set (with_gnome_integration_old no) # deprecated
795
if (enable-old-gnome-integration)
796
message (STATUS "> Gnome-Integration:")
797
message (WARNING "This applet is deprecated")
798
pkg_check_modules (OLD_GNOME_INTEGRATION gnome-vfs-2.0 libgnomeui-2.0)
799
if (NOT OLD_GNOME_INTEGRATION_FOUND)
800
message (STATUS "Could not find gnome-vfs and/or gnomeui; Cairo-Dock won't be built with Gnome<2.22 support.")
801
message (STATUS "These modules are required to compile Gnome-Integration-Old applet: gnome-vfs-2.0 libgnomeui-2.0")
802
set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} gnome-vfs-2.0 libgnomeui-2.0")
804
set (GETTEXT_GNOME_INTEGRATION_OLD ${GETTEXT_PLUGINS})
805
set (VERSION_GNOME_INTEGRATION_OLD "1.0.5")
806
set (PACKAGE_GNOME_INTEGRATION_OLD "cd_gnome-integration-old")
807
set (with_gnome_integration_old yes)
808
set (gnome_integration_olddatadir "${pluginsdatadir}/gnome-integration-old")
809
add_subdirectory ("gnome-integration-old")
813
############# ICON EFFECTS #################
814
message (STATUS "> Icon Effects:")
815
set (GETTEXT_ICON_EFFECTS ${GETTEXT_PLUGINS})
816
set (VERSION_ICON_EFFECTS "1.2.5")
817
set (PACKAGE_ICON_EFFECTS "cd-icon-effect")
818
set (icon_effectsdatadir "${pluginsdatadir}/icon-effect")
819
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/icon-effect/data/icon-effect.conf.in ${CMAKE_CURRENT_BINARY_DIR}/icon-effect/data/icon-effect.conf)
820
add_subdirectory (icon-effect)
822
############# IMPULSE #################
823
set (with_impulse no)
824
message (STATUS "> Impulse:")
825
enable_if_not_defined (enable-impulse)
827
pkg_check_modules (LIBPULSE libpulse)
828
pkg_check_modules (FFTW3 fftw3) # optional, not advised for distributions packages (it's not a small dependence...)
829
if (NOT LIBPULSE_FOUND)
830
message (STATUS "Could not find libpulse; Cairo-Dock won't be built with Impulse applet.")
831
message (WARNING "These modules are required to compile Impulse applet: libpulse (and fftw3 - optional)")
832
set (MODULES_MISSING "${MODULES_MISSING} libpulse")
834
set (GETTEXT_IMPULSE ${GETTEXT_PLUGINS})
835
set (VERSION_IMPULSE "0.0.6")
836
set (PACKAGE_IMPULSE "cd-Impulse")
837
set (with_impulse yes)
838
set (impulsedatadir "${pluginsdatadir}/Impulse")
839
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Impulse/data/Impulse.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Impulse/data/Impulse.conf)
840
add_subdirectory (Impulse)
844
############# INDICATOR_GENERIC #################
845
set (with_indicator_generic no)
847
message (STATUS "> Indicator-Generic:")
848
set (GETTEXT_INDICATOR_GENERIC ${GETTEXT_PLUGINS})
849
set (VERSION_INDICATOR_GENERIC "0.0.1")
850
set (PACKAGE_INDICATOR_GENERIC "cd-Indicator-Generic")
851
set (with_indicator_generic yes)
852
set (indicator_genericdatadir "${pluginsdatadir}/Indicator-Generic")
853
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Indicator-Generic/data/Indicator-Generic.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Indicator-Generic/data/Indicator-Generic.conf)
854
add_subdirectory (Indicator-Generic)
857
############# ILLUSION #################
858
message (STATUS "> Illusion:")
859
set (GETTEXT_ILLUSION ${GETTEXT_PLUGINS})
860
set (VERSION_ILLUSION "1.0.8")
861
set (PACKAGE_ILLUSION "cd-illusion")
862
set (illusiondatadir "${pluginsdatadir}/illusion")
863
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/illusion/data/illusion.conf.in ${CMAKE_CURRENT_BINARY_DIR}/illusion/data/illusion.conf)
864
add_subdirectory (illusion)
866
############# KDE-INTEGRATION #################
867
message (STATUS "> KDE-Integration:")
868
set (with_kde_integration no)
869
enable_if_not_defined (enable-kde-integration)
870
set (with_kde_integration2 no) # highly unstable
871
if (enable-kde-integration2)
875
message (STATUS " * Qt Includes: ${QT_INCLUDES}")
876
message (STATUS " * Qt Definitions: ${QT_DEFINITIONS}")
877
message (STATUS " * QtCore Library: ${QT_QTCORE_LIBRARY} / ${PACKAGE_LIBRARIES}")
879
message (STATUS " * Qt unavailable")
882
find_path(KDECORE_INCLUDE_DIR "kdecore_export.h")
883
find_library(KDECORE_LIBRARY NAMES "kdecore")
884
GET_FILENAME_COMPONENT(KDECORE_LIBRARY ${KDECORE_LIBRARY} PATH)
886
find_path(KIO_INCLUDE_DIR "kio_export.h" PATH_SUFFIXES "kio")
887
find_library(KIO_LIBRARY NAMES "kio")
888
GET_FILENAME_COMPONENT(KIO_LIBRARY ${KIO_LIBRARY} PATH)
890
find_path(KDE_INCLUDE_DIR "KDirWatch" PATH_SUFFIXES "KDE")
892
if (NOT KDECORE_LIBRARY)
893
message (STATUS " * KDECORE Dir: ${KDECORE_INCLUDE_DIR}")
894
message (STATUS " * KDECORE Library: ${KDECORE_LIBRARY}")
896
message (STATUS " * KDECORE unavailable")
899
message (STATUS " * KIO Dir: ${KIO_INCLUDE_DIR}")
900
message (STATUS " * KIO Library: ${KIO_LIBRARY}")
902
message (STATUS " * KIO unavailable")
904
if (NOT KDE_LIBRARY) ## always empty?
905
message (STATUS " * KDE4 Dir: ${KDE_INCLUDE_DIR}")
906
message (STATUS " * KDE4 Library: ${KDE_LIBRARY}")
908
message (STATUS " * KDE4 unavailable")
912
AND KDECORE_INCLUDE_DIR
917
message (STATUS " KDE: OK")
918
set (VERSION_KDE_INTEGRATION "0.0.4")
919
set (PACKAGE_KDE_INTEGRATION "cd_kde-integration")
920
set (with_kde_integration2 yes)
921
set (kde_integrationdatadir "${pluginsdatadir}/kde-integration2")
922
add_subdirectory ("kde-integration2")
924
message (STATUS "Could not find kde libs; Cairo-Dock won't be built with KDE support.")
925
message (STATUS "These libraries are required to compile KDE experimental applet: kdecore, kio, kde4")
926
set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} kdecore, kio, kde4")
928
elseif (enable-kde-integration)
929
pkg_check_modules (KDE_INTEGRATION gio-2.0)
930
message (STATUS " KDE_INTEGRATION_FOUND: ${KDE_INTEGRATION_FOUND}")
931
if (NOT KDE_INTEGRATION_FOUND)
932
message (STATUS "Could not find gio; Cairo-Dock won't be built with KDE support.")
933
message (STATUS "This module is required to compile KDE-Integration applet: gio-2.0")
934
set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} gio-2.0")
936
set (GETTEXT_KDE_INTEGRATION ${GETTEXT_PLUGINS})
937
set (VERSION_KDE_INTEGRATION "1.0.4")
938
set (PACKAGE_KDE_INTEGRATION "cd_kde-integration")
939
set (with_kde_integration yes)
940
set (kde_integrationdatadir "${pluginsdatadir}/kde-integration")
941
add_subdirectory ("kde-integration")
945
############# KEYBOARD_INDICATOR #################
946
message (STATUS "> Keyboard-Indicator:")
947
set (with_keyboard_indicator no)
948
enable_if_not_defined (enable-keyboard-indicator)
949
if (enable-keyboard-indicator)
950
pkg_check_modules (KEYBOARD_INDICATOR_PACKAGE libxklavier)
951
if (NOT KEYBOARD_INDICATOR_PACKAGE_FOUND)
952
message (STATUS "Could not find libxklavier; Cairo-Dock won't be built with keyboard-indicator applet.")
953
message (WARNING "This module is required to compile Keyboard-Indicator applet: libxklavier")
954
set (MODULES_MISSING "${MODULES_MISSING} libxklavier")
956
set (GETTEXT_KEYBOARD_INDICATOR ${GETTEXT_PLUGINS})
957
set (VERSION_KEYBOARD_INDICATOR "1.1.9")
958
set (PACKAGE_KEYBOARD_INDICATOR "cd-keyboard-indicator")
959
set (with_keyboard_indicator yes)
960
set (keyboard_indicatordatadir "${pluginsdatadir}/keyboard-indicator")
961
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/keyboard-indicator/data/keyboard-indicator.conf.in ${CMAKE_CURRENT_BINARY_DIR}/keyboard-indicator/data/keyboard-indicator.conf)
962
add_subdirectory ("keyboard-indicator")
966
############# LOGOUT #################
967
message (STATUS "> Logout:")
968
enable_if_not_defined (enable-upower-support)
969
if (enable-upower-support)
970
pkg_check_modules (UPOWER upower-glib) # useful for Powermanager too.
973
set (with_upower_support yes)
975
set (with_upower_support no)
976
message (STATUS "Could not find upower-glib; Logout and PowerManager plugin won't be built with UPower support.")
977
message (WARNING "This module is required to compile LogOut and PowerManager applet with UPower support: upower-glib")
978
set (MODULES_MISSING "${MODULES_MISSING} upower-glib")
980
set (GETTEXT_LOGOUT ${GETTEXT_PLUGINS})
981
set (VERSION_LOGOUT "2.0.3")
982
set (PACKAGE_LOGOUT "cd-logout")
983
set (logoutdatadir "${pluginsdatadir}/logout")
984
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/logout/data/logout.conf.in ${CMAKE_CURRENT_BINARY_DIR}/logout/data/logout.conf)
985
add_subdirectory (logout)
987
############# MAIL #################
988
message (STATUS "> Mail:")
990
# find the compilation flags
991
enable_if_not_defined (enable-mail)
993
find_program (LIBETPAN_CONFIG_EXECUTABLE libetpan-config)
995
COMMAND ${LIBETPAN_CONFIG_EXECUTABLE} --cflags
996
OUTPUT_VARIABLE MAIL_PACKAGE_CFLAGS)
997
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
998
STRING (REGEX REPLACE "\n" "" TMP_VARIABLE "${MAIL_PACKAGE_CFLAGS}") # to not skip the last option
999
STRING (REGEX MATCHALL "(^| )-I[^ ]+( |$)" TMP_VARIABLE "${TMP_VARIABLE}") # first extract the "-I" options
1000
STRING (REGEX REPLACE ";" "" TMP_VARIABLE "${TMP_VARIABLE}")
1001
STRING (REGEX REPLACE " $" "" TMP_VARIABLE "${TMP_VARIABLE}")
1002
STRING (REGEX REPLACE "^ " "" TMP_VARIABLE "${TMP_VARIABLE}")
1003
STRING (REGEX REPLACE " " " " TMP_VARIABLE "${TMP_VARIABLE}")
1004
STRING (REGEX REPLACE "-I([^ ]+)" "\\1" MAIL_PACKAGE_INCLUDE_DIRS "${TMP_VARIABLE}") # then remove the "-I" string
1006
# find the link flags
1008
COMMAND ${LIBETPAN_CONFIG_EXECUTABLE} --libs
1009
OUTPUT_VARIABLE MAIL_PACKAGE_LIBS)
1010
if (NOT "${MAIL_PACKAGE_LIBS}" STREQUAL "")
1011
STRING (REGEX REPLACE "\n" "" MAIL_PACKAGE_LIBS "${MAIL_PACKAGE_LIBS}")
1012
# find the link libraries
1013
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)
1014
STRING (REGEX REPLACE ";" "" TMP_VARIABLE "${TMP_VARIABLE}")
1015
STRING (REGEX REPLACE "^ " "" TMP_VARIABLE "${TMP_VARIABLE}")
1016
STRING (REGEX REPLACE " " " " TMP_VARIABLE "${TMP_VARIABLE}")
1017
STRING (REGEX REPLACE " $" "" MAIL_PACKAGE_LIBRARIES "${TMP_VARIABLE}")
1018
# find the link directories
1019
STRING (REGEX MATCHALL "(^| )-L[^ ]+( |$)" TMP_VARIABLE "${MAIL_PACKAGE_LIBS}") # extract the "-L" options
1020
STRING (REGEX REPLACE ";" "" TMP_VARIABLE "${TMP_VARIABLE}")
1021
STRING (REGEX REPLACE " $" "" TMP_VARIABLE "${TMP_VARIABLE}")
1022
STRING (REGEX REPLACE "^ " "" TMP_VARIABLE "${TMP_VARIABLE}")
1023
STRING (REGEX REPLACE " " " " TMP_VARIABLE "${TMP_VARIABLE}")
1024
STRING (REGEX REPLACE "-L([^ ]+)" "\\1" MAIL_PACKAGE_LIBRARY_DIRS "${TMP_VARIABLE}") # then remove the "-L" string
1026
if ("${MAIL_PACKAGE_LIBS}" STREQUAL "")
1027
message (STATUS "warning : Could not find libetpan; Cairo-Dock won't be built with Mail applet.")
1028
message (WARNING "This module is required to compile Mail applet: libetpan")
1029
set (PROGRAMS_MISSING "${PROGRAMS_MISSING} libetpan-config")
1031
message (STATUS " libetpan found. Using the following options:")
1032
message (STATUS " Include directories: ${MAIL_PACKAGE_INCLUDE_DIRS}")
1033
message (STATUS " Link directories: ${MAIL_PACKAGE_LIBRARY_DIRS}")
1034
message (STATUS " Link libraries: ${MAIL_PACKAGE_LIBRARIES}")
1035
set (GETTEXT_MAIL ${GETTEXT_PLUGINS})
1036
set (VERSION_MAIL "1.0.13")
1037
set (PACKAGE_MAIL "cd-mail")
1038
set (maildatadir "${pluginsdatadir}/mail")
1040
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/mail/data/mail.conf.in ${CMAKE_CURRENT_BINARY_DIR}/mail/data/mail.conf)
1041
add_subdirectory ("mail")
1045
############# MEMENU #################
1046
set (with_me_menu no)
1047
if (INDICATOR_NEW_VERSION AND NOT enable-memenu)
1048
message (STATUS "> MeMenu: this applet has been automatically merged with Messaging-Menu") # oneiric or newer
1049
elseif (with_indicator AND IDO_FOUND)
1050
message (STATUS "> MeMenu:")
1051
set (GETTEXT_MEMENU ${GETTEXT_PLUGINS})
1052
set (VERSION_MEMENU "1.0.5")
1053
set (PACKAGE_MEMENU "cd-MeMenu")
1054
set (memenudatadir "${pluginsdatadir}/MeMenu")
1055
set (with_me_menu yes)
1056
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/MeMenu/data/MeMenu.conf.in ${CMAKE_CURRENT_BINARY_DIR}/MeMenu/data/MeMenu.conf)
1057
add_subdirectory (MeMenu)
1060
############# MESSAGING_MENU #################
1061
set (with_messaging_menu no)
1063
message (STATUS "> Messaging-Menu:")
1064
if (with_indicator3)
1065
set (INDICATOR_MESSAGES_WITH_IND3 TRUE) # If it's supported, it's maybe better to use it
1067
set (GETTEXT_MESSAGING_MENU ${GETTEXT_PLUGINS})
1068
set (VERSION_MESSAGING_MENU "1.0.6")
1069
set (PACKAGE_MESSAGING_MENU "cd-Messaging-Menu")
1070
set (with_messaging_menu yes)
1071
set (messaging_menudatadir "${pluginsdatadir}/Messaging-Menu")
1072
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Messaging-Menu/data/Messaging-Menu.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Messaging-Menu/data/Messaging-Menu.conf)
1073
add_subdirectory (Messaging-Menu)
1076
############# MOTION BLUR #################
1077
message (STATUS "> Motion Blur:")
1078
set (GETTEXT_MOTION_BLUR ${GETTEXT_PLUGINS})
1079
set (VERSION_MOTION_BLUR "1.0.5")
1080
set (PACKAGE_MOTION_BLUR "cd-motion_blur")
1081
set (motion_blurdatadir "${pluginsdatadir}/motion-blur")
1082
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/motion-blur/data/motion_blur.conf.in ${CMAKE_CURRENT_BINARY_DIR}/motion-blur/data/motion_blur.conf)
1083
add_subdirectory (motion-blur)
1085
############# MUSICPLAYER #################
1086
message (STATUS "> MusicPlayer:")
1087
set (GETTEXT_MUSICPLAYER ${GETTEXT_PLUGINS})
1088
set (VERSION_MUSICPLAYER "2.0.3")
1089
set (PACKAGE_MUSICPLAYER "cd-musicPlayer")
1090
set (musicplayerdatadir "${pluginsdatadir}/musicPlayer")
1091
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/musicPlayer/data/musicPlayer.conf.in ${CMAKE_CURRENT_BINARY_DIR}/musicPlayer/data/musicPlayer.conf)
1092
add_subdirectory (musicPlayer)
1094
############# NETSPEED #################
1095
message (STATUS "> NetSpeed:")
1096
set (GETTEXT_NETSPEED ${GETTEXT_PLUGINS})
1097
set (VERSION_NETSPEED "1.2.11")
1098
set (PACKAGE_NETSPEED "cd-netspeed")
1099
set (netspeeddatadir "${pluginsdatadir}/netspeed")
1100
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/netspeed/data/netspeed.conf.in ${CMAKE_CURRENT_BINARY_DIR}/netspeed/data/netspeed.conf)
1101
add_subdirectory (netspeed)
1103
############# NETWORK_MONITOR #################
1104
set (with_network_monitor no) # unstable
1105
if (enable-network-monitor)
1106
message (STATUS "> Network Monitor:")
1107
set (GETTEXT_NETWORK_MONITOR ${GETTEXT_PLUGINS})
1108
set (VERSION_NETWORK_MONITOR "0.2.9")
1109
set (PACKAGE_NETWORK_MONITOR "cd-network-monitor")
1110
set (with_network_monitor yes)
1111
set (network_monitordatadir "${pluginsdatadir}/Network-Monitor")
1112
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Network-Monitor/data/Network-Monitor.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Network-Monitor/data/Network-Monitor.conf)
1113
add_subdirectory (Network-Monitor)
1116
############# POWERMANAGER #################
1117
message (STATUS "> PowerManager:")
1118
set (GETTEXT_POWERMANAGER ${GETTEXT_PLUGINS})
1119
set (VERSION_POWERMANAGER "1.3.11")
1120
set (PACKAGE_POWERMANAGER "cd-powermanager")
1121
set (powermanagerdatadir "${pluginsdatadir}/powermanager")
1122
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/powermanager/data/powermanager.conf.in ${CMAKE_CURRENT_BINARY_DIR}/powermanager/data/powermanager.conf)
1123
add_subdirectory (powermanager)
1125
############# QUICK BROWSER #################
1126
message (STATUS "> Quick Browser:")
1127
set (GETTEXT_QUICK_BROWSER ${GETTEXT_PLUGINS})
1128
set (VERSION_QUICK_BROWSER "1.0.12")
1129
set (PACKAGE_QUICK_BROWSER "cd-quick-browser")
1130
set (quick_browserdatadir "${pluginsdatadir}/quick_browser")
1131
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/quick-browser/data/quick-browser.conf.in ${CMAKE_CURRENT_BINARY_DIR}/quick-browser/data/quick-browser.conf)
1132
add_subdirectory (quick-browser)
1134
############# RECENT-EVENTS #################
1135
message (STATUS "> Recent-Events:")
1136
set (with_recent_events no)
1137
enable_if_not_defined (enable-recent-events)
1138
if (enable-recent-events)
1139
pkg_check_modules (RECENT_EVENTS zeitgeist-2.0)
1140
if (NOT RECENT_EVENTS_FOUND)
1141
message (STATUS "Could not find 'zeitgeist-2.0'; trying with an old version 'zeitgeist-1.0'...")
1142
pkg_check_modules (RECENT_EVENTS zeitgeist-1.0)
1143
set (ZEITGEIST_1_0 1)
1145
if (NOT RECENT_EVENTS_FOUND)
1146
message (STATUS "Could not find libzeitgeist; Cairo-Dock won't be built with Zeitgeist support.")
1147
message (WARNING "This module is required to compile Recent-Events applet: zeitgeist-x.0")
1148
set (MODULES_MISSING "${MODULES_MISSING} zeitgeist-x.0")
1150
set (GETTEXT_RECENT_EVENTS ${GETTEXT_PLUGINS})
1151
set (VERSION_RECENT_EVENTS "1.0.3")
1152
set (PACKAGE_RECENT_EVENTS "cd-Recent-Events")
1154
set (with_recent_events "yes (zeitgeist 1.0)")
1156
set (with_recent_events "yes (zeitgeist 2.0)")
1158
set (recent_eventsdatadir "${pluginsdatadir}/Recent-Events")
1159
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Recent-Events/data/Recent-Events.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Recent-Events/data/Recent-Events.conf)
1160
add_subdirectory ("Recent-Events")
1164
############# REMOTE_CONTROL #################
1165
message (STATUS "> Remote Control:")
1166
set (GETTEXT_REMOTE_CONTROL ${GETTEXT_PLUGINS})
1167
set (VERSION_REMOTE_CONTROL "1.0.2")
1168
set (PACKAGE_REMOTE_CONTROL "cd-Remote-Control")
1169
set (remote_controldatadir "${pluginsdatadir}/Remote-Control")
1170
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Remote-Control/data/Remote-Control.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Remote-Control/data/Remote-Control.conf)
1171
add_subdirectory (Remote-Control)
1173
############# RSSREADER #################
1174
message (STATUS "> RSSreader:")
1175
set (GETTEXT_RSS_READER ${GETTEXT_PLUGINS})
1176
set (VERSION_RSS_READER "1.0.7")
1177
set (PACKAGE_RSS_READER "cd-rssreader")
1178
set (rss_readerdatadir "${pluginsdatadir}/RSSreader")
1179
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/RSSreader/data/RSSreader.conf.in ${CMAKE_CURRENT_BINARY_DIR}/RSSreader/data/RSSreader.conf)
1180
add_subdirectory (RSSreader)
1182
############# SCOOBY_DO #################
1183
set (with_scooby_do no) # unstable
1184
if (enable-scooby-do)
1185
message (STATUS "> Scooby-Do:")
1186
set (GETTEXT_SCOOBY_DO ${GETTEXT_PLUGINS})
1187
set (VERSION_SCOOBY_DO "0.1.3")
1188
set (PACKAGE_SCOOBY_DO "cd-scooby-do")
1189
set (with_scooby_do yes)
1190
set (scooby_dodatadir "${pluginsdatadir}/Scooby-Do")
1191
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Scooby-Do/data/Scooby-Do.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Scooby-Do/data/Scooby-Do.conf)
1192
add_subdirectory (Scooby-Do)
1195
############# SCREENSHOT #################
1196
message (STATUS "> Screenshot:")
1197
set (GETTEXT_SCREENSHOT ${GETTEXT_PLUGINS})
1198
set (VERSION_SCREENSHOT "0.0.1")
1199
set (PACKAGE_SCREENSHOT "cd-Screenshot")
1200
set (screenshotdatadir "${pluginsdatadir}/Screenshot")
1201
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Screenshot/data/Screenshot.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Screenshot/data/Screenshot.conf)
1202
add_subdirectory (Screenshot)
1204
############# SHORTCUTS #################
1205
message (STATUS "> Shortcuts:")
1206
set (GETTEXT_SHORTCUTS ${GETTEXT_PLUGINS})
1207
set (VERSION_SHORTCUTS "1.3.5")
1208
set (PACKAGE_SHORTCUTS "cd-shortcuts")
1209
set (shortcutsdatadir "${pluginsdatadir}/shortcuts")
1210
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/shortcuts/data/shortcuts.conf.in ${CMAKE_CURRENT_BINARY_DIR}/shortcuts/data/shortcuts.conf)
1211
add_subdirectory (shortcuts)
1213
############# SHOW DESKTOP #################
1214
message (STATUS "> ShowDesktop:")
1215
enable_if_not_defined (enable-xrandr-support)
1216
if (enable-xrandr-support)
1217
pkg_check_modules (SHOW_DESKTOP_XRANDR xrandr)
1218
if (NOT SHOW_DESKTOP_XRANDR_FOUND)
1219
message (STATUS "Could not find xrandr; ShowDesktop won't be built with screen resolution abilities.")
1220
message (WARNING "This module is required to compile ShowDesktop applet with xRandr support: xrandr")
1221
set (MODULES_MISSING "${MODULES_MISSING} xrandr")
1222
set (with_xrandr no)
1224
set (with_xrandr yes)
1227
set (GETTEXT_SHOW_DESKTOP ${GETTEXT_PLUGINS})
1228
set (VERSION_SHOW_DESKTOP "1.2.8")
1229
set (PACKAGE_SHOW_DESKTOP "cd-showDesktop")
1230
set (show_desktopdatadir "${pluginsdatadir}/showDesktop")
1231
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/showDesktop/data/showDesktop.conf.in ${CMAKE_CURRENT_BINARY_DIR}/showDesktop/data/showDesktop.conf)
1232
add_subdirectory (showDesktop)
1234
############# SHOW MOUSE #################
1235
message (STATUS "> Show Mouse:")
1236
set (GETTEXT_SHOW_MOUSE ${GETTEXT_PLUGINS})
1237
set (VERSION_SHOW_MOUSE "1.0.5")
1238
set (PACKAGE_SHOW_MOUSE "cd-show_mouse")
1239
set (show_mousedatadir "${pluginsdatadir}/show_mouse")
1240
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/show-mouse/data/show_mouse.conf.in ${CMAKE_CURRENT_BINARY_DIR}/show-mouse/data/show_mouse.conf)
1241
add_subdirectory (show-mouse)
1243
############# SLIDER #################
1244
message (STATUS "> Slider:")
1246
enable_if_not_defined (enable-exif-support)
1247
if (enable-exif-support)
1248
pkg_check_modules (EXIF libexif)
1250
message (STATUS "Could not find libexif; Slider won't be able to rotate the images accordingly to their exif data.")
1251
message (WARNING "This module is required to compile Slider applet with Exif support: libexif")
1252
set (MODULES_MISSING "${MODULES_MISSING} libexif")
1257
set (GETTEXT_SLIDER ${GETTEXT_PLUGINS})
1258
set (VERSION_SLIDER "2.0.14")
1259
set (PACKAGE_SLIDER "cd-slider")
1260
set (sliderdatadir "${pluginsdatadir}/slider")
1261
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/slider/data/slider.conf.in ${CMAKE_CURRENT_BINARY_DIR}/slider/data/slider.conf)
1262
add_subdirectory (slider)
1264
############# SOUND_EFFECTS #################
1265
set (with_sound_effects no)
1266
enable_if_not_defined (enable-sound-effects)
1267
if (enable-sound-effects)
1268
pkg_check_modules (ALSA_PACKAGE alsa)
1269
if (NOT ALSA_PACKAGE_FOUND)
1270
message (STATUS "Could not find alsa; Cairo-Dock won't be built with Sound-Effect applet.")
1271
message (WARNING "This module is required to compile Sound-Effect applet: alsa")
1272
set (MODULES_MISSING "${MODULES_MISSING} alsa")
1274
message (STATUS "> Sound-Effects:")
1275
set (GETTEXT_SOUND_EFFECTS ${GETTEXT_PLUGINS})
1276
set (VERSION_SOUND_EFFECTS "0.0.1")
1277
set (PACKAGE_SOUND_EFFECTS "cd-Sound-Effects")
1278
set (with_sound_effects yes)
1279
set (sound_effectsdatadir "${pluginsdatadir}/Sound-Effects")
1280
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Sound-Effects/data/Sound-Effects.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Sound-Effects/data/Sound-Effects.conf)
1281
add_subdirectory (Sound-Effects)
1285
############# STACK #################
1286
message (STATUS "> Stack:")
1287
set (GETTEXT_STACK ${GETTEXT_PLUGINS})
1288
set (VERSION_STACK "0.3.5")
1289
set (PACKAGE_STACK "cd-stack")
1290
set (stackdatadir "${pluginsdatadir}/stack")
1291
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/stack/data/stack.conf.in ${CMAKE_CURRENT_BINARY_DIR}/stack/data/stack.conf)
1292
add_subdirectory (stack)
1294
############# STATUS NOTIFIER #################
1295
message (STATUS "> Status Notifier:")
1296
if (NOT DBUSMENU_GTK_FOUND)
1297
message (STATUS "Could not find Status-Notifier libs; Cairo-Dock won't be built with Status-Notifier support.")
1298
message (WARNING "This module is required to compile Status Notifier applet: ${DBUSMENU_GTK_MODULE}(-0.4)")
1299
# set (MODULES_MISSING "${MODULES_MISSING} dbusmenu-gtk(-0.4)") # it should already be in the list.
1300
set (with_status_notifier no)
1302
if (force_indicator_applicationadded_have_hint)
1303
set (INDICATOR_APPLICATIONADDED_HAS_HINT 1)
1304
elseif (DEFINED force_indicator_applicationadded_have_hint)
1305
set (INDICATOR_APPLICATIONADDED_HAS_HINT 0)
1307
message (STATUS " Used old DBus name = ${INDICATOR_OLD_NAMES}")
1308
message (STATUS " ApplicationAdded signal has 'Hint' = ${INDICATOR_APPLICATIONADDED_HAS_HINT}")
1309
message (STATUS " ApplicationAdded signal has 'Title' = ${INDICATOR_APPLICATIONADDED_HAS_TITLE}")
1310
set (GETTEXT_STATUS_NOTIFIER ${GETTEXT_PLUGINS})
1311
set (VERSION_STATUS_NOTIFIER "0.1.8")
1312
set (PACKAGE_STATUS_NOTIFIER "cd-status-notifier")
1313
set (with_status_notifier yes)
1314
set (status_notifierdatadir "${pluginsdatadir}/Status-Notifier")
1315
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Status-Notifier/data/Status-Notifier.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Status-Notifier/data/Status-Notifier.conf)
1316
add_subdirectory (Status-Notifier)
1319
############# SWITCHER #################
1320
message (STATUS "> Switcher:")
1321
set (GETTEXT_SWITCHER ${GETTEXT_PLUGINS})
1322
set (VERSION_SWITCHER "2.2.0")
1323
set (PACKAGE_SWITCHER "cd-switcher")
1324
set (switcherdatadir "${pluginsdatadir}/switcher")
1325
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/switcher/data/switcher.conf.in ${CMAKE_CURRENT_BINARY_DIR}/switcher/data/switcher.conf)
1326
add_subdirectory (switcher)
1328
############# SYSTEM MONITOR #################
1329
message (STATUS "> System Monitor:")
1330
enable_if_not_defined (enable-sensors-support)
1331
if (enable-sensors-support)
1332
find_package (Sensors)
1333
if (NOT SENSORS_FOUND)
1334
message (STATUS "Could not find libsensors; System-Monitor won't be able to monitor fan speed and CPU temperature.")
1335
message (WARNING "This package is required to compile System Monitor applet with Sensors support: sensors")
1336
set (PROGRAMS_MISSING "${PROGRAMS_MISSING} sensors")
1337
set (with_sensors no)
1339
set (with_sensors yes)
1342
set (GETTEXT_SYSTEM_MONITOR ${GETTEXT_PLUGINS})
1343
set (VERSION_SYSTEM_MONITOR "1.0.13")
1344
set (PACKAGE_SYSTEM_MONITOR "cd-system-monitor")
1345
set (system_monitordatadir "${pluginsdatadir}/System-monitor")
1346
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/System-Monitor/data/System-Monitor.conf.in ${CMAKE_CURRENT_BINARY_DIR}/System-Monitor/data/System-Monitor.conf)
1347
add_subdirectory (System-Monitor)
1349
############# SYSTRAY #################
1350
message (STATUS "> Systray:")
1351
set (GETTEXT_SYSTRAY ${GETTEXT_PLUGINS})
1352
set (VERSION_SYSTRAY "0.2.6")
1353
set (PACKAGE_SYSTRAY "cd-systray")
1354
set (systraydatadir "${pluginsdatadir}/systray")
1355
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/systray/data/systray.conf.in ${CMAKE_CURRENT_BINARY_DIR}/systray/data/systray.conf)
1356
add_subdirectory (systray)
1358
############# TERMINAL #################
1359
message (STATUS "> Terminal:")
1360
enable_if_not_defined (enable-terminal)
1361
if (enable-terminal)
1362
if (gtkversion EQUAL 2)
1363
set (TERMINAL_MODULE vte)
1365
set (TERMINAL_MODULE vte-2.90)
1367
pkg_check_modules (TERMINAL_PACKAGE ${TERMINAL_MODULE})
1368
if (NOT TERMINAL_PACKAGE_FOUND)
1369
message (STATUS "Could not find ${TERMINAL_MODULE}; Cairo-Dock won't be built with terminal applet.")
1370
message (WARNING "This module is required to compile Terminal applet: ${TERMINAL_MODULE}")
1371
set (MODULES_MISSING "${MODULES_MISSING} ${TERMINAL_MODULE}")
1372
set (with_terminal no)
1374
set (GETTEXT_TERMINAL ${GETTEXT_PLUGINS})
1375
set (VERSION_TERMINAL "1.0.14")
1376
set (PACKAGE_TERMINAL "cd-terminal")
1377
set (with_terminal yes)
1378
set (terminaldatadir "${pluginsdatadir}/terminal")
1379
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/terminal/data/terminal.conf.in ${CMAKE_CURRENT_BINARY_DIR}/terminal/data/terminal.conf)
1380
add_subdirectory (terminal)
1384
############# TOMBOY #################
1385
message (STATUS "> Tomboy:")
1386
set (GETTEXT_TOMBOY ${GETTEXT_PLUGINS})
1387
set (VERSION_TOMBOY "1.3.5")
1388
set (PACKAGE_TOMBOY "cd-tomboy")
1389
set (tomboydatadir "${pluginsdatadir}/tomboy")
1390
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/tomboy/data/tomboy.conf.in ${CMAKE_CURRENT_BINARY_DIR}/tomboy/data/tomboy.conf)
1391
add_subdirectory (tomboy)
1393
############# TOONS #################
1394
message (STATUS "> Toons:")
1395
set (GETTEXT_TOONS ${GETTEXT_PLUGINS})
1396
set (VERSION_TOONS "1.0.14")
1397
set (PACKAGE_TOONS "cd-Toons")
1398
set (toonsdatadir "${pluginsdatadir}/Toons")
1399
set (toonsuserdirname "Toons")
1400
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Toons/data/Toons.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Toons/data/Toons.conf)
1401
add_subdirectory (Toons)
1403
############# WEATHER #################
1404
message (STATUS "> Weather:")
1405
set (GETTEXT_WEATHER ${GETTEXT_PLUGINS})
1406
set (VERSION_WEATHER "1.2.15")
1407
set (PACKAGE_WEATHER "cd-weather")
1408
set (weatherdatadir "${pluginsdatadir}/weather")
1409
set (weatheruserdirname "weather")
1410
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/weather/data/weather.conf.in ${CMAKE_CURRENT_BINARY_DIR}/weather/data/weather.conf)
1411
add_subdirectory (weather)
1413
############# WEBLETS #################
1414
message (STATUS "> Weblets:")
1415
set (with_weblets no)
1416
enable_if_not_defined (enable-weblets)
1418
if (gtkversion EQUAL 2)
1419
set (WEBKIT_MODULE webkit-1.0)
1421
set (WEBKIT_MODULE webkitgtk-3.0)
1423
pkg_check_modules (WEBKIT ${WEBKIT_MODULE})
1424
if (NOT WEBKIT_FOUND)
1425
message (STATUS "Could not find ${WEBKIT_MODULE}; Cairo-Dock won't be built with Weblets applet.")
1426
message (WARNING "This module is required to compile Weblets applet: ${WEBKIT_MODULE}")
1427
set (MODULES_MISSING "${MODULES_MISSING} ${WEBKIT_MODULE}")
1429
set (GETTEXT_WEBLETS ${GETTEXT_PLUGINS})
1430
set (VERSION_WEBLETS "0.0.14")
1431
set (PACKAGE_WEBLETS "cd-weblets")
1432
set (webletsdatadir "${pluginsdatadir}/weblets")
1433
set (with_weblets yes)
1434
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/weblets/data/weblets.conf.in ${CMAKE_CURRENT_BINARY_DIR}/weblets/data/weblets.conf)
1435
add_subdirectory ("weblets")
1439
############# WIFI #################
1440
message (STATUS "> WiFi:")
1441
set (GETTEXT_WIFI ${GETTEXT_PLUGINS})
1442
set (VERSION_WIFI "1.3.2")
1443
set (PACKAGE_WIFI "cd-wifi")
1444
set (wifidatadir "${pluginsdatadir}/wifi")
1445
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/wifi/data/wifi.conf.in ${CMAKE_CURRENT_BINARY_DIR}/wifi/data/wifi.conf)
1446
add_subdirectory (wifi)
1448
############# XFCE-INTEGRATION #################
1449
message (STATUS "> XFCE-Integration:")
1450
set (with_xfce_integration no)
1451
enable_if_not_defined (enable-xfce-integration)
1452
if (enable-xfce-integration)
1453
pkg_check_modules (XFCE_INTEGRATION_THUNAR QUIET thunar-vfs-1) # thunar-vfs is not used if gvfs (gio) is available
1454
pkg_check_modules (XFCE_INTEGRATION_GVFS gio-2.0)
1455
if (XFCE_INTEGRATION_THUNAR_FOUND AND XFCE_INTEGRATION_GVFS_FOUND)
1456
message (STATUS "Could find neither thunar-vfs or libgio-2.0; Cairo-Dock won't be built with XFCE support.")
1457
message (STATUS "This module is required to compile XFCE-Integration applet: gio-2.0 (or thunar-vfs-1)")
1458
set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} gio-2.0")
1460
set (GETTEXT_XFCE_INTEGRATION ${GETTEXT_PLUGINS})
1461
set (VERSION_XFCE_INTEGRATION "1.0.4")
1462
set (PACKAGE_XFCE_INTEGRATION "cd_xfce-integration")
1463
set (with_xfce_integration yes)
1464
set (xfce_integrationdatadir "${pluginsdatadir}/xfce-integration")
1465
add_subdirectory ("xfce-integration")
1469
############# XGAMMA #################
1470
message (STATUS "> XGamma:")
1471
enable_if_not_defined (enable-xgamma)
1473
pkg_check_modules (XGAMMA_PACKAGE x11 xxf86vm)
1474
if (NOT XGAMMA_PACKAGE_FOUND)
1475
message (STATUS "Could not find xxf86vm; Cairo-Dock won't be built with Xgamma applet.")
1476
message (WARNING "These modules are required to compile XGamma applet: x11 and xxf86vm")
1477
set (MODULES_MISSING "${MODULES_MISSING} x11 xxf86vm")
1478
set (with_xgamma no)
1480
set (GETTEXT_XGAMMA ${GETTEXT_PLUGINS})
1481
set (VERSION_XGAMMA "1.2.4")
1482
set (PACKAGE_XGAMMA "cd-Xgamma")
1483
set (with_xgamma yes)
1484
set (xgammadatadir "${pluginsdatadir}/Xgamma")
1485
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Xgamma/data/Xgamma.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Xgamma/data/Xgamma.conf)
1486
add_subdirectory ("Xgamma")
1491
message (STATUS "===============")
1492
message (STATUS "Language build:")
1493
message (STATUS "===============")
1495
add_subdirectory (po)
1498
message (STATUS "===============")
1499
message (STATUS "Plug-ins build:")
1500
message (STATUS "===============")
1502
message (STATUS "Stable:")
1503
message (STATUS " Integration plug-ins:")
1504
message (STATUS " - with Gnome support: ${with_gnome_integration}")
1505
message (STATUS " - with KDE support: ${with_kde_integration}")
1506
message (STATUS " - with XFCE support: ${with_xfce_integration}")
1507
message (STATUS " Plug-ins:")
1508
message (STATUS " - with Alsa-Mixer applet: ${with_alsa}")
1509
message (STATUS " - with GMenu applet: ${with_gmenu}")
1510
message (STATUS " - with Impulse applet: ${with_impulse}")
1511
message (STATUS " - with Indicator-Generic applet: ${with_indicator_generic}")
1512
message (STATUS " - with Keyboard-indicator applet: ${with_keyboard_indicator}")
1513
message (STATUS " - with Mail applet: ${with_mail}")
1514
if (NOT INDICATOR_NEW_VERSION OR enable-memenu) # oneiric or newer
1515
message (STATUS " - with Me-Menu applet applet: ${with_me_menu}")
1517
message (STATUS " - with Messaging-Menu applet: ${with_messaging_menu}")
1518
message (STATUS " - with Recent-Events applet: ${with_recent_events}")
1519
message (STATUS " - with Sound Effects applet: ${with_sound_effects}")
1520
message (STATUS " - with Status-Notifier applet: ${with_status_notifier}")
1521
message (STATUS " - with Terminal applet: ${with_terminal}")
1522
message (STATUS " - with Weblets applet: ${with_weblets}")
1523
message (STATUS " - with Xgamma applet: ${with_xgamma}")
1524
message (STATUS "Add On:")
1525
message (STATUS " - with Sound-Menu support: ${with_soundmenu}")
1526
message (STATUS " - with Screen Resolution support: ${with_xrandr}")
1527
message (STATUS " - with Sensors support: ${with_sensors}")
1528
message (STATUS " - with UPower support: ${with_upower_support}")
1529
message (STATUS " - with iCal support: ${with_ical}")
1530
message (STATUS " - with Exif support: ${with_exif}")
1531
message (STATUS "Third Party Interfaces:")
1532
message (STATUS " - with Python2 interface: ${with_python2}")
1533
message (STATUS " - with Python3 interface: ${with_python3}")
1534
message (STATUS " - with Ruby interface: ${with_ruby}")
1535
message (STATUS " - with Mono interface: ${with_mono}")
1536
message (STATUS " - with Vala interface: ${with_vala}")
1537
message (STATUS " - with Vala Translator (valac): ${with_valac}")
1538
message (STATUS "Unstable:")
1539
message (STATUS " - with Global-Menu applet: ${with_global_menu}")
1540
message (STATUS " - with Disks applet: ${with_disks}")
1541
message (STATUS " - with Doncky applet: ${with_doncky}")
1542
message (STATUS " - with KDE experimental support: ${with_kde_integration2}")
1543
message (STATUS " - with Network-Monitor applet: ${with_network_monitor}")
1544
message (STATUS " - with Scooby-Do applet: ${with_scooby_do}")
1545
message (STATUS "Deprecated:")
1546
message (STATUS " - with old Gnome support: ${with_gnome_integration_old}")
1548
if (NOT "${MODULES_MISSING}" STREQUAL "")
1550
message (STATUS "WARNING: It seems that one (or more) module(s) is (are) missing:${MODULES_MISSING}")
1551
message (STATUS "It can be interesting to install them (especially if you're a maintainer of Cairo-Dock's packages).")
1554
if (NOT "${PROGRAMS_MISSING}" STREQUAL "")
1556
message (STATUS "WARNING: It seems that one (or more) program(s) or package(s) is (are) missing:${PROGRAMS_MISSING}")
1557
message (STATUS "It can be interesting to install them (especially if you're a maintainer of Cairo-Dock's packages).")
1560
if (NOT "${MODULES_INTEGRATION_MISSING}" STREQUAL "")
1562
message (STATUS "WARNING: It seems that one (or more) module(s) for the integration with the system is (are) missing:${MODULES_INTEGRATION_MISSING}")
1563
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.")