diff options
Diffstat (limited to 'tests/auto/cmake/CMakeLists.txt')
-rw-r--r-- | tests/auto/cmake/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt index b270ab4eda..1ad56e1adc 100644 --- a/tests/auto/cmake/CMakeLists.txt +++ b/tests/auto/cmake/CMakeLists.txt @@ -60,6 +60,11 @@ set(required_packages Core Network Xml Sql Test) set(optional_packages DBus Gui Widgets PrintSupport OpenGL Concurrent) # Setup the test when called as a completely standalone project. +if(TARGET Qt6::Core) + # Tests are built as part of the qtbase build tree. + # Setup paths so that the Qt packages are found, similar to examples. + qt_internal_set_up_build_dir_package_paths() +endif() find_package(Qt6 REQUIRED COMPONENTS ${required_packages}) find_package(Qt6 OPTIONAL_COMPONENTS ${optional_packages}) |