diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-06-15 13:22:17 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-06-23 11:38:14 +0200 |
commit | 689ac8b2a15b2ca16acd348bdd79cdf4788c1be2 (patch) | |
tree | 4d89aec1e0028d47b27fe25fcbd0211d74b6105e /CMakeLists.txt | |
parent | 36827a9011ce008673d7a9b73bc74ee208ea8ebd (diff) |
CMake: Look for ShaderTools package in additional package paths
This is needed for Conan Qt builds because the usual locations
(CMAKE_PREFIX_PATH as set by the qt.toolchain.cmake file) will
not contain the location of qtshadertools, qtsvg, etc.
Each of those are in separate Conan package dirs which are passed
via the QT_ADDITIONAL_PACKAGES_PREFIX_PATH variable.
Those paths are searched by Qt6Config.cmake and other files, but the
initial find_package call here also needs those paths.
The change likely won't help with cross-builds and will need
additional changes in qtbase.
Task-number: QTBUG-94524
Change-Id: I6f4c10065948a3bf0e36410fd52139dfd42b5c0c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a0ffc0a99a..0f147cb464 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,11 @@ endif() # This can't use the find_package(Qt6 COMPONENTS) signature, because Qt6Config uses NO_DEFAULT and # won't look at the prepend extra find root paths. -find_package(Qt6ShaderToolsTools ${PROJECT_VERSION} QUIET CONFIG) +find_package(Qt6ShaderToolsTools ${PROJECT_VERSION} QUIET CONFIG + PATHS + ${_qt_additional_packages_prefix_path} + ${_qt_additional_packages_prefix_path_env} +) if(NOT "${QT_HOST_PATH}" STREQUAL "") set(CMAKE_PREFIX_PATH ${_qt_backup_qtdeclarative_CMAKE_PREFIX_PATH}) |