diff options
author | Alex Neundorf <neundorf@kde.org> | 2012-02-18 15:12:37 +0100 |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2012-02-18 15:12:37 +0100 |
commit | 54995246620b13793722977aeeb72821519e65e5 (patch) | |
tree | 6cb83b2cc5bf9bdeb15baeda38a1210e67132310 | |
parent | 3dea0a0c6be9df8db4d01d6d5dda07c4a6279482 (diff) | |
download | extra-cmake-modules-54995246620b13793722977aeeb72821519e65e5.tar.gz extra-cmake-modules-54995246620b13793722977aeeb72821519e65e5.tar.bz2 |
-add more settings to KDECMakeSettings.cmake
Alex
-rw-r--r-- | kde-modules/KDECMakeSettings.cmake | 44 |
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() + +################################################################### |