From 540bd6cf203969363e641027b66fb044d9ccb1f6 Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Wed, 12 Feb 2020 15:37:12 +0100 Subject: 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 Reviewed-by: Alexandru Croitor --- cmake/QtBuild.cmake | 4 ++-- 1 file 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() -- cgit v1.2.3