diff options
Diffstat (limited to 'modules/ECMAddTests.cmake')
-rw-r--r-- | modules/ECMAddTests.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/ECMAddTests.cmake b/modules/ECMAddTests.cmake index 96673888..2a992156 100644 --- a/modules/ECMAddTests.cmake +++ b/modules/ECMAddTests.cmake @@ -114,6 +114,10 @@ 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) + set(_plugin_path $ENV{QT_PLUGIN_PATH}) + set_property(TEST ${_testname} PROPERTY ENVIRONMENT QT_PLUGIN_PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}:${_plugin_path}) + endif() if (ARG_TARGET_NAME_VAR) set(${ARG_TARGET_NAME_VAR} "${_targetname}" PARENT_SCOPE) endif() |