diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-05-27 17:36:11 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-05-28 15:13:43 +0200 |
commit | b56dc55c3a5c4164ad84fd61c44638a3cb196978 (patch) | |
tree | f40f818dd560bca2215ea2c8e11a781f0351d81a /cmake/QtFeature.cmake | |
parent | e189126f1ae1d2fa2ad0f95ee2c4aa72c770a97b (diff) |
CMake: Fix qmake .depends info generated for module_private.pri files
Previously we checked the LINK_LIBRARIES property of the main module
target, but we should instead use the values of
INTERFACE_LINK_LIBRARIES set on the FooPrivate module.
Because both versionless targets and private targets are interface
libraries, we need to properly differentiate between them when
following versionless targets to their main associated target.
To do that, instead of using string comparison, export an additional
private _qt_is_versionless_target property, and query that.
Also make sure to set and export the _qt_config_module_name property
on the FooPrivate targets.
Also make sure to APPEND to EXPORT_PROPERTIES rather than override
(looking at you QtFeature.cmake).
Task-number: QTBUG-75666
Change-Id: Ia3261e218840e9f5217ab49755e8c876560e294d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'cmake/QtFeature.cmake')
-rw-r--r-- | cmake/QtFeature.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake index 52475dfa85..dbe3553a5f 100644 --- a/cmake/QtFeature.cmake +++ b/cmake/QtFeature.cmake @@ -539,7 +539,7 @@ function(qt_feature_module_end) set(propertyPrefix "INTERFACE_") else() set(propertyPrefix "") - set_target_properties("${target}" PROPERTIES EXPORT_PROPERTIES "QT_ENABLED_PUBLIC_FEATURES;QT_DISABLED_PUBLIC_FEATURES;QT_ENABLED_PRIVATE_FEATURES;QT_DISABLED_PRIVATE_FEATURES;MODULE_PLUGIN_TYPES;QT_PLUGINS;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;MODULE_PLUGIN_TYPES;QT_PLUGINS;QT_QMAKE_PUBLIC_CONFIG;QT_QMAKE_PRIVATE_CONFIG;QT_QMAKE_PUBLIC_QT_CONFIG") endif() foreach(visibility public private) string(TOUPPER "${visibility}" capitalVisibility) |