From ada1664ba2e04a3ecb7cf32faacebd6006473526 Mon Sep 17 00:00:00 2001 From: David Faure Date: Sun, 31 Mar 2019 20:29:13 +0200 Subject: Re-enable the setting of QT_PLUGIN_PATH, without the strange backslash. Let's see if purpose unittests still work on Windows (which was the reason this got commented out, kio_file wasn't found anymore). CCMAIL: bcooksley@kde.org, kfunk@kde.org --- modules/ECMAddTests.cmake | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'modules') diff --git a/modules/ECMAddTests.cmake b/modules/ECMAddTests.cmake index da6217df..eb9601ce 100644 --- a/modules/ECMAddTests.cmake +++ b/modules/ECMAddTests.cmake @@ -114,15 +114,15 @@ function(ecm_add_test) add_test(NAME ${_testname} COMMAND ${_targetname}) target_link_libraries(${_targetname} ${ARG_LINK_LIBRARIES}) ecm_mark_as_test(${_targetname}) - #if (CMAKE_LIBRARY_OUTPUT_DIRECTORY) - # if(CMAKE_HOST_SYSTEM MATCHES "Windows") - # set(PATHSEP "\\;") - # else() # e.g. Linux - # set(PATHSEP ":") - # endif() - # set(_plugin_path $ENV{QT_PLUGIN_PATH}) - # set_property(TEST ${_testname} PROPERTY ENVIRONMENT QT_PLUGIN_PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}${PATHSEP}${_plugin_path}) - #endif() + if (CMAKE_LIBRARY_OUTPUT_DIRECTORY) + if(CMAKE_HOST_SYSTEM MATCHES "Windows") + set(PATHSEP ";") + else() # e.g. Linux + set(PATHSEP ":") + endif() + set(_plugin_path $ENV{QT_PLUGIN_PATH}) + set_property(TEST ${_testname} PROPERTY ENVIRONMENT QT_PLUGIN_PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}${PATHSEP}${_plugin_path}) + endif() if (ARG_TARGET_NAME_VAR) set(${ARG_TARGET_NAME_VAR} "${_targetname}" PARENT_SCOPE) endif() -- cgit v1.2.1