diff options
author | Andreas Pakulat <apaku@gmx.de> | 2007-06-24 22:47:46 +0000 |
---|---|---|
committer | Andreas Pakulat <apaku@gmx.de> | 2007-06-24 22:47:46 +0000 |
commit | 06b456e025ac2b511a7587d4758f49ad489b5189 (patch) | |
tree | a97af6423e4e8bc81a03906e47d2e1a5490e77c3 /modules/KDE4Macros.cmake | |
parent | a6b2d40be6e4cb4984a0a23ab8543f88b4570cf2 (diff) | |
download | extra-cmake-modules-06b456e025ac2b511a7587d4758f49ad489b5189.tar.gz extra-cmake-modules-06b456e025ac2b511a7587d4758f49ad489b5189.tar.bz2 |
Fix the kde4_add_test_executable macro by setting EXECUTABLE_OUTPUT_PATH and
add a convience define to not have to install xmlgui and other files.
Adapt knotify and kdeui tests to this change (remove the extra add_definitions there)
svn path=/trunk/KDE/kdelibs/; revision=679803
Diffstat (limited to 'modules/KDE4Macros.cmake')
-rw-r--r-- | modules/KDE4Macros.cmake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index d31c75ee..c3493c5e 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -766,6 +766,9 @@ endmacro (KDE4_ADD_UNIT_TEST) # The targets are always created, but only built for the "all" # target if the option KDE4_BUILD_TESTS is enabled. Otherwise the rules for the target # are created but not built by default. You can build them by manually building the target. +# KDESRCDIR is set to the source directory of the test, this can be used with +# KGlobal::dirs()->addResourceDir( "data", KDESRCDIR ); to be able to use xmlgui +# and other things in the test, that normally require installation macro (KDE4_ADD_TEST_EXECUTABLE _target_NAME) set(_add_executable_param) @@ -774,13 +777,14 @@ macro (KDE4_ADD_TEST_EXECUTABLE _target_NAME) set(_add_executable_param EXCLUDE_FROM_ALL) endif (NOT KDE4_BUILD_TESTS) + set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) + kde4_get_automoc_files(_automoc_FILES ${ARGN}) add_executable(${_target_NAME} ${_add_executable_param} ${ARGN} ${_automoc_FILES}) set_target_properties(${_target_NAME} PROPERTIES - EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} - DEFINITIONS -DKDESRCDIR=\\"${CMAKE_CURRENT_SOURCE_DIR}\\" + COMPILE_FLAGS -DKDESRCDIR=\\"${CMAKE_CURRENT_SOURCE_DIR}\\" SKIP_BUILD_RPATH FALSE BUILD_WITH_INSTALL_RPATH FALSE) |