mirror of
https://github.com/dguglielmi/sunny-overlay.git
synced 2025-12-06 16:02:39 +01:00
113 lines
4.0 KiB
Diff
113 lines
4.0 KiB
Diff
--- cairo-dock-plugins-3.3.2/CMakeLists.txt.upower0 2013-10-29 19:27:30.000000000 +0900
|
|
+++ cairo-dock-plugins-3.3.2/CMakeLists.txt 2014-06-16 14:00:42.543802818 +0900
|
|
@@ -152,6 +152,14 @@
|
|
set (shared_filesdatadir "${pluginsdatadir}/shared-files")
|
|
add_subdirectory (shared-files)
|
|
|
|
+
|
|
+
|
|
+################################################################################
|
|
+# STATIC LIBS AND DEPENDENCES USED BY MORE THAN ONE PLUG-IN #
|
|
+################################################################################
|
|
+
|
|
+
|
|
+
|
|
############# STATIC LIBRARIES ################
|
|
message (STATUS "> Static Libraries:")
|
|
|
|
@@ -337,6 +345,29 @@
|
|
endif()
|
|
endif()
|
|
|
|
+############# UPOWER #####################
|
|
+message (STATUS "> UPower:")
|
|
+enable_if_not_defined (enable-upower-support)
|
|
+if (enable-upower-support)
|
|
+ pkg_check_modules (UPOWER upower-glib) # useful for Powermanager too.
|
|
+endif()
|
|
+if (UPOWER_FOUND)
|
|
+ set (with_upower_support yes)
|
|
+ STRING (REGEX REPLACE "\\..*" "" UPOWER_MAJOR "${UPOWER_VERSION}") # 2.28.3 => 2
|
|
+ STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" UPOWER_MINOR "${UPOWER_VERSION}") # 2.28.3 => 2.28
|
|
+ STRING (REGEX REPLACE "\\.[0-9]*" "" UPOWER_MINOR "${UPOWER_MINOR}") # 2.28 => 28
|
|
+ if (${UPOWER_MAJOR} GREATER 0 OR ${UPOWER_MINOR} GREATER 89)
|
|
+ message (STATUS " Your version of UPower no longer supports logout features")
|
|
+ else()
|
|
+ set (UPOWER_SUPPORTS_LOGOUT 1)
|
|
+ endif()
|
|
+else()
|
|
+ set (with_upower_support no)
|
|
+ message (STATUS "Could not find upower-glib; Logout and PowerManager plugin won't be built with UPower support.")
|
|
+ message (WARNING "This module is required to compile LogOut and PowerManager applet with UPower support: upower-glib")
|
|
+ set (MODULES_MISSING "${MODULES_MISSING} upower-glib")
|
|
+endif()
|
|
+
|
|
############# DISTRIBUTION #################
|
|
message (STATUS "> Distribution:")
|
|
# We try to detect if the user is on Ubuntu to know which bus we have to use...
|
|
@@ -965,18 +996,6 @@
|
|
|
|
############# LOGOUT #################
|
|
message (STATUS "> Logout:")
|
|
-enable_if_not_defined (enable-upower-support)
|
|
-if (enable-upower-support)
|
|
- pkg_check_modules (UPOWER upower-glib) # useful for Powermanager too.
|
|
-endif()
|
|
-if (UPOWER_FOUND)
|
|
- set (with_upower_support yes)
|
|
-else()
|
|
- set (with_upower_support no)
|
|
- message (STATUS "Could not find upower-glib; Logout and PowerManager plugin won't be built with UPower support.")
|
|
- message (WARNING "This module is required to compile LogOut and PowerManager applet with UPower support: upower-glib")
|
|
- set (MODULES_MISSING "${MODULES_MISSING} upower-glib")
|
|
-endif()
|
|
set (GETTEXT_LOGOUT ${GETTEXT_PLUGINS})
|
|
set (VERSION_LOGOUT "2.0.3")
|
|
set (PACKAGE_LOGOUT "cd-logout")
|
|
--- cairo-dock-plugins-3.3.2/logout/src/CMakeLists.txt.upower0 2013-10-03 20:04:33.000000000 +0900
|
|
+++ cairo-dock-plugins-3.3.2/logout/src/CMakeLists.txt 2014-06-16 14:01:03.155216380 +0900
|
|
@@ -20,22 +20,29 @@
|
|
add_definitions (-DMY_APPLET_GETTEXT_DOMAIN="${GETTEXT_LOGOUT}")
|
|
add_definitions (-DMY_APPLET_DOCK_VERSION="${dock_version}")
|
|
add_definitions (-DMY_APPLET_ICON_FILE="icon.svg")
|
|
-if (${UPOWER_FOUND})
|
|
- add_definitions (-DCD_UPOWER_AVAILABLE="1")
|
|
-endif()
|
|
|
|
+if (UPOWER_SUPPORTS_LOGOUT)
|
|
+ add_definitions (-DCD_UPOWER_AVAILABLE="1")
|
|
+
|
|
+ include_directories (
|
|
+ ${UPOWER_INCLUDE_DIRS}
|
|
+ ${PACKAGE_INCLUDE_DIRS})
|
|
+
|
|
+ link_directories (
|
|
+ ${UPOWER_LIBRARY_DIRS}
|
|
+ ${PACKAGE_LIBRARY_DIRS})
|
|
+
|
|
+ target_link_libraries (${PACKAGE_LOGOUT}
|
|
+ ${UPOWER_LIBRARIES}
|
|
+ ${PACKAGE_LIBRARIES})
|
|
+else()
|
|
+ include_directories (${PACKAGE_INCLUDE_DIRS})
|
|
|
|
-include_directories (
|
|
- ${UPOWER_INCLUDE_DIRS}
|
|
- ${PACKAGE_INCLUDE_DIRS})
|
|
-
|
|
-link_directories (
|
|
- ${UPOWER_LIBRARY_DIRS}
|
|
- ${PACKAGE_LIBRARY_DIRS})
|
|
-
|
|
-target_link_libraries (${PACKAGE_LOGOUT}
|
|
- ${UPOWER_LIBRARIES}
|
|
- ${PACKAGE_LIBRARIES})
|
|
+ link_directories (${PACKAGE_LIBRARY_DIRS})
|
|
+
|
|
+ target_link_libraries (${PACKAGE_LOGOUT}
|
|
+ ${PACKAGE_LIBRARIES})
|
|
+endif()
|
|
|
|
########### install files ###############
|
|
|