summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2023-08-18 15:48:21 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2023-08-23 16:21:58 +0200
commitb6849849392cf14ead014833976d1926504985d2 (patch)
treeea1ead1865e73fa9a12c91bc0162f88098955a3c /tests/auto/cmake
parentf081578ce097e5b437a0b1beee84f7056e9099f8 (diff)
CMake: Fix find_package(Qt6*Tools) in non-qtbase tests
Tests in non-qtbase modules could not find_package their own Qt6*Tools packages, because add_subdirectory(tests) was called before the config files for Qt6*Tools were created. The creation of tools config files is done in QtPostProcess.cmake, which was included in qt_build_repo_end(). Move that include into its own macro, qt_build_repo_post_process() and remove it from qt_build_repo_end(). Call qt_build_repo_post_process() before the 'tests' directory is added in qt_build_repo(). Every call site of qt_build_repo_end() must now be adjusted and call qt_build_repo_post_process(). Task-number: QTBUG-88264 Change-Id: I80d60a1b5c0e9b715c298ef4934b562f815432d1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tests/auto/cmake')
-rw-r--r--tests/auto/cmake/mockplugins/CMakeLists.txt1
-rw-r--r--tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt1
-rw-r--r--tests/auto/cmake/test_static_resources/CMakeLists.txt1
3 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/cmake/mockplugins/CMakeLists.txt b/tests/auto/cmake/mockplugins/CMakeLists.txt
index dd246ed0ff..1bde9aedb1 100644
--- a/tests/auto/cmake/mockplugins/CMakeLists.txt
+++ b/tests/auto/cmake/mockplugins/CMakeLists.txt
@@ -29,4 +29,5 @@ add_subdirectory(mock4plugin)
add_subdirectory(mock5plugin)
add_subdirectory(mock6plugin)
+qt_build_repo_post_process()
qt_build_repo_end()
diff --git a/tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt b/tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt
index 66f5d5e5e0..564d23ca05 100644
--- a/tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt
+++ b/tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt
@@ -20,4 +20,5 @@ qt_build_repo_begin()
add_subdirectory(test_autogenerating_cpp_exports)
add_subdirectory(test_autogenerating_cpp_exports_custom_name)
+qt_build_repo_post_process()
qt_build_repo_end()
diff --git a/tests/auto/cmake/test_static_resources/CMakeLists.txt b/tests/auto/cmake/test_static_resources/CMakeLists.txt
index 4885459a33..e3cab9cf4a 100644
--- a/tests/auto/cmake/test_static_resources/CMakeLists.txt
+++ b/tests/auto/cmake/test_static_resources/CMakeLists.txt
@@ -22,4 +22,5 @@ add_subdirectory(mock_static_resources1)
add_subdirectory(test_init_resources_static_plugin)
add_subdirectory(test_static_resources_propagation)
+qt_build_repo_post_process()
qt_build_repo_end()