diff --git a/src/plugins/projectexplorer/CMakeLists.txt b/src/plugins/projectexplorer/CMakeLists.txt index 1be0ea8a801..245b1c19db0 100644 --- a/src/plugins/projectexplorer/CMakeLists.txt +++ b/src/plugins/projectexplorer/CMakeLists.txt @@ -215,14 +215,14 @@ extend_qtc_plugin(ProjectExplorer jsonwizard/jsonwizard_test.cpp outputparser_test.cpp outputparser_test.h ) - -file(GLOB_RECURSE test_resources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} testdata/*) -qt_add_resources(ProjectExplorer "testdata" - CONDITION WITH_TESTS +if (WITH_TESTS) + file(GLOB_RECURSE test_resources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} testdata/*) + qtc_add_resources(ProjectExplorer "testdata" PREFIX "/projectexplorer" BASE "." FILES ${test_resources} -) + ) +endif() qtc_plugin_enabled(_projectexplorer_enabled ProjectExplorer) if (WITH_TESTS AND _projectexplorer_enabled)