diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2023-04-12 15:04:14 +0200 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2023-04-24 14:20:25 +0200 |
commit | f3c10280f59d35fbf0862e6e353602e7aa8ef901 (patch) | |
tree | 06af7491abdf9743014e3392a1ea1189ce470c97 /tests/auto/cmake | |
parent | a92c202b49777696cbc64003f6292e6b61952140 (diff) |
Introduce the qt_internal_project_setup macro
The macro sets the required CMake variables and policies and
should be called right after the
find_package(Qt6 COMPONENTS BuildInternals... call to make sure that
the subsequent code adopt all the required policies.
Pick-to: 6.5
Task-number: QTBUG-112685
Change-Id: I9f93f728ee4d8ae7743db9fffafa26025c76dcf2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tests/auto/cmake')
-rw-r--r-- | tests/auto/cmake/mockplugins/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/auto/cmake/test_static_resources/CMakeLists.txt | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/cmake/mockplugins/CMakeLists.txt b/tests/auto/cmake/mockplugins/CMakeLists.txt index 0711631dec..dd246ed0ff 100644 --- a/tests/auto/cmake/mockplugins/CMakeLists.txt +++ b/tests/auto/cmake/mockplugins/CMakeLists.txt @@ -12,6 +12,8 @@ project(QtMockPlugins ) find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core) +qt_internal_project_setup() + find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Gui Widgets Xml) qt_build_repo_begin() diff --git a/tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt b/tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt index 3de368ba1a..66f5d5e5e0 100644 --- a/tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt +++ b/tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt @@ -13,6 +13,7 @@ project(TestGeneratingCppExports ) find_package(Qt6 COMPONENTS Core BuildInternals Test CONFIG REQUIRED) +qt_internal_project_setup() qt_build_repo_begin() diff --git a/tests/auto/cmake/test_static_resources/CMakeLists.txt b/tests/auto/cmake/test_static_resources/CMakeLists.txt index bddc1df932..4885459a33 100644 --- a/tests/auto/cmake/test_static_resources/CMakeLists.txt +++ b/tests/auto/cmake/test_static_resources/CMakeLists.txt @@ -13,6 +13,7 @@ project(TestStaticResources ) find_package(Qt6 COMPONENTS Core BuildInternals Test CONFIG REQUIRED) +qt_internal_project_setup() qt_build_repo_begin() |