summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-08-26 10:25:18 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-26 13:36:02 +0000
commite2b712fc90b8218f95d2f412be3e152423dbfc28 (patch)
tree5293700df176ab21e5ce1b1331dabd1387683693 /cmake
parente6625f67808887bc19921c967201d8037d6d7d4e (diff)
CMake: Properly export MODULE_PLUGIN_TYPES
Don't export the MODULE_PLUGIN_TYPES property only when a module has an associated configure.cmake file with features. Instead, always export it if a module defines a plugin type. This fixes qttools DesignerTargets.cmake file to contain the plugin types it defines, given that the Designer lib does not declare any features via a configure.cmake file. Task-number: QTBUG-95668 Change-Id: Ic036c31768e03b51d3bce9c2afe48e04f69f435b Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit d806ce6fc57cf402668ecf73aa8531be5f201f9c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtFeature.cmake2
-rw-r--r--cmake/QtModuleHelpers.cmake3
2 files changed, 4 insertions, 1 deletions
diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake
index 5a2f52c7c6..b63ad24e9a 100644
--- a/cmake/QtFeature.cmake
+++ b/cmake/QtFeature.cmake
@@ -677,7 +677,7 @@ function(qt_feature_module_end)
set(propertyPrefix "INTERFACE_")
else()
set(propertyPrefix "")
- set_property(TARGET "${target}" APPEND PROPERTY EXPORT_PROPERTIES "QT_ENABLED_PUBLIC_FEATURES;QT_DISABLED_PUBLIC_FEATURES;QT_ENABLED_PRIVATE_FEATURES;QT_DISABLED_PRIVATE_FEATURES;MODULE_PLUGIN_TYPES;QT_QMAKE_PUBLIC_CONFIG;QT_QMAKE_PRIVATE_CONFIG;QT_QMAKE_PUBLIC_QT_CONFIG")
+ set_property(TARGET "${target}" APPEND PROPERTY EXPORT_PROPERTIES "QT_ENABLED_PUBLIC_FEATURES;QT_DISABLED_PUBLIC_FEATURES;QT_ENABLED_PRIVATE_FEATURES;QT_DISABLED_PRIVATE_FEATURES;QT_QMAKE_PUBLIC_CONFIG;QT_QMAKE_PRIVATE_CONFIG;QT_QMAKE_PUBLIC_QT_CONFIG")
endif()
foreach(visibility public private)
string(TOUPPER "${visibility}" capitalVisibility)
diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake
index e85f57768e..4c1d3ee9c6 100644
--- a/cmake/QtModuleHelpers.cmake
+++ b/cmake/QtModuleHelpers.cmake
@@ -344,6 +344,9 @@ function(qt_internal_add_module target)
# Save the non-sanitized plugin type values for qmake consumption via .pri files.
set_property(TARGET "${target}"
PROPERTY QMAKE_MODULE_PLUGIN_TYPES "${arg_PLUGIN_TYPES}")
+
+ # Export the plugin types.
+ set_property(TARGET ${target} APPEND PROPERTY EXPORT_PROPERTIES MODULE_PLUGIN_TYPES)
endif()
endif()