diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-04-28 15:25:18 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-05-11 18:57:17 +0200 |
commit | b104bedea171825db06cc257179bb3e05915a159 (patch) | |
tree | 55e601dcef355da3cc1cb1247d6b7bea7dea2cd7 /cmake/QtConfig.cmake.in | |
parent | 867c0b8d8a53974074b1fff5b132f3ae9f150066 (diff) |
CMake: Refactor handling of static plugins
Extract common static plugin handling functionality into a separate
QtPublicPluginHelpers.cmake file which is loaded by the Qt6 package.
Split the code into smaller functions that will be re-used by each
templated QtPlugins.cmake.in file, rather than copy pasting the same
code into each QtFooPlugins.cmake file.
As a drive-by, handle QtFeatures.cmake and QtFeaturesCommon.cmake
as public helper files just like QtPublicPluginHelpers.cmake.
This makes it clearer that the functions are available outside
the internal Qt build and also provides a way for not dumping new
helper functions into Qt6CoreMacros.cmake.
Task-number: QTBUG-92933
Change-Id: Id816ef009b4fac1cd317d3ef23f21b3530028067
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/QtConfig.cmake.in')
-rw-r--r-- | cmake/QtConfig.cmake.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/QtConfig.cmake.in b/cmake/QtConfig.cmake.in index 451d4191a7..d762cd50ca 100644 --- a/cmake/QtConfig.cmake.in +++ b/cmake/QtConfig.cmake.in @@ -53,6 +53,10 @@ set(QT_ADDITIONAL_PACKAGES_PREFIX_PATH "" CACHE STRING "Additional directories w file(TO_CMAKE_PATH "${QT_ADDITIONAL_PACKAGES_PREFIX_PATH}" _qt_additional_packages_prefix_path) file(TO_CMAKE_PATH "$ENV{QT_ADDITIONAL_PACKAGES_PREFIX_PATH}" _qt_additional_packages_prefix_path_env) +# Public helpers available to all Qt packages. +include("${CMAKE_CURRENT_LIST_DIR}/QtFeature.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/QtPublicPluginHelpers.cmake") + # Find required dependencies, if any. include(CMakeFindDependencyMacro) if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@Dependencies.cmake") |