diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2024-03-18 18:51:51 +0100 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2024-03-21 16:22:59 +0100 |
commit | 840f5c17602bc46871cebef10a48e32ee617c116 (patch) | |
tree | 8200be63a94907cf28a22dd85eaaa2aa2a152ed2 /cmake | |
parent | 7aecb189d544613ad13c7e7d1207bd7767225a71 (diff) |
Set the _qt_ module properties for interface targets
The module properties starting with _qt can be set on interface
targets. We should set them to handle _qt_config_module_name
property for Private targets correctly. Otherwise private imported
modules do not land in .pri files as dependencies.
Amends 173164cd477211e574c0d04abef51aa0f4c3f78d
Fixes: QTBUG-123410
Change-Id: I14866eb407e6ddcbd625f5546cba22ccc7b6a297
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtPublicCMakeHelpers.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cmake/QtPublicCMakeHelpers.cmake b/cmake/QtPublicCMakeHelpers.cmake index 02a67582ea..b8a3e6eef9 100644 --- a/cmake/QtPublicCMakeHelpers.cmake +++ b/cmake/QtPublicCMakeHelpers.cmake @@ -356,6 +356,9 @@ function(_qt_internal_create_versionless_targets targets install_namespace) QT_QMAKE_PRIVATE_CONFIG QT_QMAKE_PUBLIC_CONFIG QT_QMAKE_PUBLIC_QT_CONFIG + ) + + set(known_qt_exported_properties_interface_allowed _qt_config_module_name _qt_is_public_module _qt_module_has_headers @@ -429,5 +432,14 @@ function(_qt_internal_create_versionless_targets targets install_namespace) INTERFACE_${property} "${interface_property_value}") endif() endforeach() + + foreach(property IN LISTS known_qt_exported_properties_interface_allowed) + get_target_property(exported_property_value + ${install_namespace}::${target} ${property}) + if(exported_property_value) + set_property(TARGET Qt::${target} APPEND PROPERTY + ${property} "${exported_property_value}") + endif() + endforeach() endforeach() endfunction() |