diff options
| -rw-r--r-- | modules/KDE4Macros.cmake | 19 | 
1 files changed, 8 insertions, 11 deletions
| 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.") | 
