summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorSerghei Amelian <serghei.amelian@gmail.com>2012-02-15 02:36:12 +0200
committerSerghei Amelian <serghei.amelian@gmail.com>2012-02-15 02:36:12 +0200
commitb5236f1d75d5784aa9f1dac7e826921e7c464b6b (patch)
tree413aac2a5fa3b7c4ae022ab24c49661c04eda861 /ConfigureChecks.cmake
parent39c1afd3f898e9577981edf624e96d46777fb07e (diff)
downloadtdebase-b5236f1d75d5784aa9f1dac7e826921e7c464b6b.tar.gz
tdebase-b5236f1d75d5784aa9f1dac7e826921e7c464b6b.zip
[tdebase/ksmserver] added UPower support
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake44
1 files changed, 29 insertions, 15 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 8c84b5bc8..47c343f65 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -1,6 +1,6 @@
#################################################
#
-# (C) 2010-2011 Serghei Amelian
+# (C) 2010-2012 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
@@ -215,7 +215,7 @@ find_package( TQt )
find_package( TDE )
-# dbus-tqt need Qt flags
+
# dbus (tdm, ksmserver)
if( BUILD_TDM OR BUILD_KSMSERVER )
@@ -224,19 +224,33 @@ if( BUILD_TDM OR BUILD_KSMSERVER )
tde_message_fatal( "dbus-1 is required, but was not found on your system" )
endif( )
- # check for dbus-tqt
- pkg_check_modules( DBUS_TQT REQUIRED dbus-tqt )
- tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
- set( CMAKE_REQUIRED_INCLUDES ${DBUS_TQT_INCLUDE_DIRS} ${TQT_INCLUDE_DIRS} ${QT_INCLUDE_DIRS})
- set( CMAKE_REQUIRED_LIBRARIES ${DBUS_TQT_LDFLAGS} ${TQT_LDFLAGS} ${QT_LDFLAGS} )
- check_cxx_source_compiles("
- #include <tqt.h>
- #include <dbus/connection.h>
- int main(int, char**) { return 0; } "
- HAVE_DBUS_QT3_07 )
- tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
- if( NOT HAVE_DBUS_QT3_07 )
- tde_message_fatal( "dbus-tqt is required, but was not found on your system" )
+endif( )
+
+
+# tqt-dbus (tdm, ksmserver)
+if( BUILD_TDM OR BUILD_KSMSERVER )
+
+ if( BUILD_KSMSERVER AND WITH_UPOWER )
+ pkg_check_modules( DBUS_1_TQT dbus-1-tqt )
+ if( NOT DBUS_1_TQT_FOUND )
+ tde_message_fatal( "dbus-tqt-1 is required, but was not found on your system" )
+ endif( )
+ else( )
+ # check for dbus-tqt
+ # dbus-tqt need Qt flags
+ pkg_check_modules( DBUS_TQT REQUIRED dbus-tqt )
+ tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
+ set( CMAKE_REQUIRED_INCLUDES ${DBUS_TQT_INCLUDE_DIRS} ${TQT_INCLUDE_DIRS} ${QT_INCLUDE_DIRS})
+ set( CMAKE_REQUIRED_LIBRARIES ${DBUS_TQT_LDFLAGS} ${TQT_LDFLAGS} ${QT_LDFLAGS} )
+ check_cxx_source_compiles("
+ #include <tqt.h>
+ #include <dbus/connection.h>
+ int main(int, char**) { return 0; } "
+ HAVE_DBUS_QT3_07 )
+ tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
+ if( NOT HAVE_DBUS_QT3_07 )
+ tde_message_fatal( "dbus-tqt is required, but was not found on your system" )
+ endif( )
endif( )
endif( )