aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kde-modules/KDECMakeSettings.cmake44
1 files changed, 43 insertions, 1 deletions
diff --git a/kde-modules/KDECMakeSettings.cmake b/kde-modules/KDECMakeSettings.cmake
index c6a7b93d..fb9d9c6e 100644
--- a/kde-modules/KDECMakeSettings.cmake
+++ b/kde-modules/KDECMakeSettings.cmake
@@ -1,4 +1,6 @@
# KDE_SKIP_RPATH_SETTINGS
+# KDE_SKIP_BUILD_SETTINGS
+# KDE_SKIP_TEST_SETTINGS
################# RPATH handling ##################################
@@ -36,6 +38,46 @@ if(NOT KDE_SKIP_RPATH_SETTINGS)
endif()
-###################################################################
+################ Testing setup ####################################
+
+
+if(NOT KDE_SKIP_TEST_SETTINGS)
+ enable_testing()
+
+ # support for cdash dashboards
+ if (EXISTS ${CMAKE_SOURCE_DIR}/CTestConfig.cmake)
+ include(CTest)
+ endif (EXISTS ${CMAKE_SOURCE_DIR}/CTestConfig.cmake)
+endif()
+
+# Tell FindQt4.cmake to point the QT_QTFOO_LIBRARY targets at the imported targets
+# for the Qt libraries, so we get full handling of release and debug versions of the
+# Qt libs and are flexible regarding the install location of Qt under Windows
+set(QT_USE_IMPORTED_TARGETS TRUE)
+
+
+################ Build-related settings ###########################
+if(NOT KDE_SKIP_BUILD_SETTINGS)
+ # Always include srcdir and builddir in include path
+ # This saves typing ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} in about every subdir
+ # since cmake 2.4.0
+ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+ # put the include dirs which are in the source or build tree
+ # before all other include dirs, so the headers in the sources
+ # are prefered over the already installed ones
+ # since cmake 2.4.1
+ set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
+
+
+ # This will only have an effect in CMake 2.8.7
+ set(CMAKE_LINK_INTERFACE_LIBRARIES "")
+
+ # Enable automoc in cmake
+ set(CMAKE_AUTOMOC ON)
+
+endif()
+
+###################################################################