aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Funk <kfunk@kde.org>2017-11-24 00:01:37 +0100
committerKevin Funk <kfunk@kde.org>2017-11-24 00:07:24 +0100
commit64915e0291cd8ad00fbdf9526977961de8341368 (patch)
tree14df0adb4cbcdf8715c30bc07a9315909ce3858f
parent53ef4705c32429bf5a41ff5fa9a15260672d3ab3 (diff)
downloadextra-cmake-modules-64915e0291cd8ad00fbdf9526977961de8341368.tar.gz
extra-cmake-modules-64915e0291cd8ad00fbdf9526977961de8341368.tar.bz2
ecm_add_test: Use proper path sep on Windows
Summary: We need to separate paths in environment variables with a semincolon (;) on Windows. Reviewers: dfaure Subscribers: #frameworks, #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D8979
-rw-r--r--modules/ECMAddTests.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/ECMAddTests.cmake b/modules/ECMAddTests.cmake
index 2a992156..571874d5 100644
--- a/modules/ECMAddTests.cmake
+++ b/modules/ECMAddTests.cmake
@@ -115,8 +115,13 @@ function(ecm_add_test)
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}:${_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)