summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2020-02-12 15:37:12 +0100
committerLeander Beernaert <leander.beernaert@qt.io>2020-02-18 21:22:58 +0100
commit540bd6cf203969363e641027b66fb044d9ccb1f6 (patch)
treee7e7b31ebe72fab472592a5f40db40798b201d0d
parentba165cae71746719a990da66abb40649ece69303 (diff)
Only install tests data for prefix builds
If we install tests data for non-prefix builds it can cause tests to fail as they find the data in the wrong location. An example of this is tst_qsslkey. Change-Id: I55bd2ff4cb5a0857dc857cb2149ffe4436ec6f99 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--cmake/QtBuild.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index b8bd422c53..98cc1aeccf 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -2797,11 +2797,11 @@ function(qt_add_test name)
foreach(testdata IN LISTS arg_TESTDATA)
set(testdata "${CMAKE_CURRENT_SOURCE_DIR}/${testdata}")
if (IS_DIRECTORY "${testdata}")
- qt_copy_or_install(
+ qt_install(
DIRECTORY "${testdata}"
DESTINATION "${testdata_install_dir}")
else()
- qt_copy_or_install(
+ qt_install(
FILES "${testdata}"
DESTINATION "${testdata_install_dir}")
endif()