summaryrefslogtreecommitdiffstats
path: root/cmake/QtPostProcessHelpers.cmake
diff options
context:
space:
mode:
authorLisandro Damián Nicanor Pérez Meyer <[email protected]>2023-11-01 21:41:59 -0300
committerLisandro Damián Nicanor Pérez Meyer <[email protected]>2023-11-02 18:04:56 -0300
commitac6af2f322f3deb3a40c8e1295704662581725b2 (patch)
treee3b38c796953c6c3bfe7ee706b2c74243b616fc7 /cmake/QtPostProcessHelpers.cmake
parentc861f9acef70af5bdd317847fb6cfca79da3eb49 (diff)
Be verbose on plugin inclusion, easy patch point for distros
TL;DR: This creates two changes: 1. Makes the plugin inclusion status more visible for builders for both Qt itself and applications. 2. Allows a simple patch-point for distros to change the default (perhaps not ideal, but good enough). 3. Does not changes the current behavior. As discussed both in the mailing list and privately with Alexandru Croitor and Joerg Bornemann this makes a lot os sense for Qt on static builds and when trying to find where the plugins are so they can be easily packaged up in order to distribute a build with all the dependencies on it. But at the same time it makes no sense for distributions building the libraries in dynamic mode as it forces unnecesary build time dependencies for for both Qt and applications like QML modules or even PostgreSQL! [0]. [0] <https://sources.debian.org/src/martchus-qtutilities/6.10.0-1/cmake/modules/QtConfig.cmake/?hl=35#L35> Other approaches have been considered like not shipping specific CMake files, but this depends on the packager finding the right ones at the right time, and does not allows end users to change the behavior if they happen to need it. Change-Id: Id32fbc0cf0f289edd4426fb703cf1195288aacb4 Reviewed-by: Alexandru Croitor <[email protected]>
Diffstat (limited to 'cmake/QtPostProcessHelpers.cmake')
-rw-r--r--cmake/QtPostProcessHelpers.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake
index 83bcabe49b8..82a88565a65 100644
--- a/cmake/QtPostProcessHelpers.cmake
+++ b/cmake/QtPostProcessHelpers.cmake
@@ -446,6 +446,15 @@ function(qt_internal_create_plugins_auto_inclusion_files)
# TODO: Find a better way to deal with this, perhaps by using find_package() instead of include
# for the Qml PluginConfig.cmake files.
+# Distributions should probably change this default.
+if(NOT DEFINED QT_SKIP_AUTO_QML_PLUGIN_INCLUSION)
+ set(QT_SKIP_AUTO_QML_PLUGIN_INCLUSION OFF)
+endif()
+
+if(QT_REPO_MODULE_VERSION)
+ message(STATUS \"Skip auto QML plugin inclusion is set to \${QT_SKIP_AUTO_QML_PLUGIN_INCLUSION}\")
+endif()
+
file(GLOB __qt_qml_plugins_config_file_list \"\${CMAKE_CURRENT_LIST_DIR}/QmlPlugins/${INSTALL_CMAKE_NAMESPACE}*Config.cmake\")
if (__qt_qml_plugins_config_file_list AND NOT QT_SKIP_AUTO_QML_PLUGIN_INCLUSION)
# First round of inclusions ensure all qml plugin targets are brought into scope.