diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-09-30 13:22:15 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-01 12:05:59 +0000 |
commit | 0ceef4cb54be9b7bb927e2f746d210a0b9fcac59 (patch) | |
tree | f93487715962e4f633d676b14280d089e65be61a /cmake/QtPluginDependencies.cmake.in | |
parent | 3886828c1fc038a1f10924e5eb704cdc47c7d435 (diff) |
Always append extra cmake modules to CMAKE_MODULE_PATH in Qt6Config
During a static build we need to use the find modules
in 3rdparty/extra-cmake-modules/find-modules when generating a
ModuleDependencies file, so that the generated find_dependency()
calls succeed. This means that the files have to be shipped with
Qt6 package, making them pseudo public API.
There is also a need to use these files when building QtWayland.
Instead of setting / unsetting CMAKE_MODULE_PATH only in module
and plugin Dependencies cmake files, just set them once when finding
Qt6.
This will allow QtWayland and QtX11Extras to easily find the required
third party packages, without having to hardcode the paths in multiple
repos.
Change-Id: I750d0421a269e5632afa1bb62498c2501d73cdb1
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'cmake/QtPluginDependencies.cmake.in')
-rw-r--r-- | cmake/QtPluginDependencies.cmake.in | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/cmake/QtPluginDependencies.cmake.in b/cmake/QtPluginDependencies.cmake.in index 0dd6ba5a08..5be4a8ca3e 100644 --- a/cmake/QtPluginDependencies.cmake.in +++ b/cmake/QtPluginDependencies.cmake.in @@ -1,10 +1,3 @@ -# Save old module path, and append a new path that points to the copied over Find modules -# so that find_dependency() can find the third party packages. -set(old_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}") -list(APPEND CMAKE_MODULE_PATH "${_import_prefix}/../@INSTALL_CMAKE_NAMESPACE@") -list(APPEND CMAKE_MODULE_PATH "${_import_prefix}/../@INSTALL_CMAKE_NAMESPACE@/3rdparty/extra-cmake-modules/find-modules") -list(APPEND CMAKE_MODULE_PATH "${_import_prefix}/../@INSTALL_CMAKE_NAMESPACE@/3rdparty/kwin") - # note: _third_party_deps example: "ICU\\;1.0\\;i18n uc data;ZLIB\\;\\;" set(_third_party_deps "@third_party_deps@") @@ -32,9 +25,6 @@ foreach(_target_dep ${_third_party_deps}) endif() endforeach() -# Restore old module path. -set(CMAKE_MODULE_PATH "${old_CMAKE_MODULE_PATH}") - # note: target_deps example: "Qt6Core\;5.12.0;Qt6Gui\;5.12.0" set(_target_deps "@target_deps@") foreach(_target_dep ${_target_deps}) |