From 09bf2d93e473314638c84988f3294af443d2e694 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 22 Nov 2009 18:56:09 +0000 Subject: -use the LOCATION target property instead EXECUTABLE_OUTPUT_PATH Alex svn path=/trunk/KDE/kdelibs/; revision=1052901 --- modules/KDE4Macros.cmake | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'modules') diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index c4ddedc9..5a7b701c 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -801,24 +801,21 @@ macro (KDE4_ADD_UNIT_TEST _test_NAME) endif(NOT using_qtest) endforeach(_filename) + get_target_property( loc ${_test_NAME} LOCATION ) if(WIN32) - get_target_property( loc ${_targetName} LOCATION ) if(MSVC_IDE) STRING(REGEX REPLACE "\\$\\(.*\\)" "\${CTEST_CONFIGURATION_TYPE}" loc "${loc}") endif() # .bat because of rpath handling - set(_executable ${loc}.bat) + set(_executable "${loc}.bat") else(WIN32) - set(_executable ${EXECUTABLE_OUTPUT_PATH}/${_test_NAME}) - endif(WIN32) - if (Q_WS_MAC AND NOT _nogui) + if (Q_WS_MAC AND NOT _nogui) set(_executable ${EXECUTABLE_OUTPUT_PATH}/${_test_NAME}.app/Contents/MacOS/${_test_NAME}) - else (Q_WS_MAC AND NOT _nogui) - # Use .shell wrapper where available, to use uninstalled libs. - if (UNIX) - set(_executable ${_executable}.shell) - endif (UNIX) - endif (Q_WS_MAC AND NOT _nogui) + else (Q_WS_MAC AND NOT _nogui) + # .shell because of rpath handling + set(_executable "${loc}.shell") + endif (Q_WS_MAC AND NOT _nogui) + endif(WIN32) if (using_qtest AND KDE4_TEST_OUTPUT STREQUAL "xml") #MESSAGE(STATUS "${_targetName} : Using QTestLib, can produce XML report.") -- cgit v1.2.1