summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-03 22:42:46 +0000
committersamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-03 22:42:46 +0000
commitc4dd3197ecbc0f3fd3c89d130ef4ef207a5f7afc (patch)
tree580bd88aa18ba4c7c7d98330696bd1965ecd5134
parent4304e8d9dab8e20513e38e71b0debdf6937b630c (diff)
downloadkpowersave-c4dd3197ecbc0f3fd3c89d130ef4ef207a5f7afc.tar.gz
kpowersave-c4dd3197ecbc0f3fd3c89d130ef4ef207a5f7afc.zip
[kpowersave] updated cmake
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kpowersave@1230316 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--CMakeLists.txt3
-rw-r--r--ConfigureChecks.cmake24
-rw-r--r--src/CMakeLists.txt4
3 files changed, 11 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7385430..7e743ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,10 +44,9 @@ include( ConfigureChecks.cmake )
add_definitions(
-DHAVE_CONFIG_H
- ${TQT_CFLAGS_OTHER}
)
-set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include tqt.h" )
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index a971c48..2e2826b 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -43,12 +43,7 @@ if( NOT XSCRNSAVER_FOUND )
endif()
-# required stuff
-find_package( Qt )
-find_package( TQt )
-find_package( TDE )
-
-
+# check for dbus-1
pkg_search_module( DBUS dbus-1 )
if( NOT DBUS_FOUND )
tde_message_fatal( "dbus-1 is required, but was not found on your system" )
@@ -56,15 +51,12 @@ endif( )
# check for dbus-tqt
-tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
-set( CMAKE_REQUIRED_INCLUDES ${QT_INCLUDE_DIRS} ${TQT_INCLUDE_DIRS} ${DBUS_INCLUDE_DIRS} )
-set( CMAKE_REQUIRED_LIBRARIES ${TQT_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 )
+pkg_search_module( DBUS_TQT dbus-tqt )
+if( NOT DBUS_TQT_FOUND )
tde_message_fatal( "dbus-tqt is required, but was not found on your system" )
endif( )
+
+
+# required stuff
+find_package( TQt )
+find_package( TDE )
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 950185d..3bddbfe 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -16,7 +16,7 @@ include_directories(
${CMAKE_BINARY_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
- ${DBUS_INCLUDE_DIRS}
+ ${DBUS_TQT_INCLUDE_DIRS}
${HAL_INCLUDE_DIRS}
)
@@ -48,6 +48,6 @@ tde_add_kdeinit_executable( kpowersave AUTOMOC
kpowersave.skel log_viewer.ui logviewer.cpp main.cpp
screen.cpp settings.cpp suspenddialog.cpp suspend_Dialog.ui
LINK
- dbus-tqt-1 kio-shared ${DBUS_LIBRARIES} ${HAL_LIBRARIES}
+ ${DBUS_TQT_LIBRARIES} kio-shared ${HAL_LIBRARIES}
${XEXT_LIBRARIES} ${XTST_LIBRARIES} ${XSCRNSAVER_LIBRARIES}
)