summaryrefslogtreecommitdiffstats
path: root/cmake/QtModuleDependencies.cmake.in
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-09-30 13:22:15 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-10-01 12:05:59 +0000
commit0ceef4cb54be9b7bb927e2f746d210a0b9fcac59 (patch)
treef93487715962e4f633d676b14280d089e65be61a /cmake/QtModuleDependencies.cmake.in
parent3886828c1fc038a1f10924e5eb704cdc47c7d435 (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/QtModuleDependencies.cmake.in')
-rw-r--r--cmake/QtModuleDependencies.cmake.in10
1 files changed, 0 insertions, 10 deletions
diff --git a/cmake/QtModuleDependencies.cmake.in b/cmake/QtModuleDependencies.cmake.in
index c9cfa9e752..ffb9e8a5d3 100644
--- a/cmake/QtModuleDependencies.cmake.in
+++ b/cmake/QtModuleDependencies.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@")
@@ -30,9 +23,6 @@ foreach(_target_dep ${_third_party_deps})
endif()
endforeach()
-# Restore old module path.
-set(CMAKE_MODULE_PATH "${old_CMAKE_MODULE_PATH}")
-
# Find Qt tool package.
set(_tool_deps "@main_module_tool_deps@")