Allow adding extra content to module pri

On the qmake-side we had exports, but they were quoted.

Change-Id: I95af4b927079691cab6403fec850f345ba181a00
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Tor Arne Vestbø 2020-10-27 16:50:51 +01:00
parent ba7ef28ea9
commit 517c885239
2 changed files with 6 additions and 2 deletions

View File

@ -148,9 +148,11 @@ function(qt_generate_module_pri_file target)
"${property_prefix}QT_MODULE_INTERNAL_CONFIG")
get_target_property(module_uses "${target}"
"${property_prefix}QT_MODULE_USES")
get_target_property(module_pri_extra_content "${target}"
"${property_prefix}QT_MODULE_PRI_EXTRA_CONTENT")
foreach(var enabled_features disabled_features enabled_private_features disabled_private_features
module_internal_config module_uses)
module_internal_config module_uses module_pri_extra_content)
if(${var} STREQUAL "${var}-NOTFOUND")
set(${var} "")
else()
@ -274,6 +276,7 @@ QT.${config_module_name}.enabled_features = ${enabled_features}
QT.${config_module_name}.disabled_features = ${disabled_features}${extra_assignments}
QT_CONFIG += ${enabled_features}
QT_MODULES += ${config_module_name_base}
${module_pri_extra_content}
"
)

View File

@ -153,7 +153,8 @@ defineReplace(qtExportLibsForModule) {
$$qtGetExportsForModule($$MODULE_ID) \
"QT_CONFIG +=$$join(QT.$${MODULE_ID}.QT_CONFIG, " ", " ")" \
"" \
"QT_MODULES += $$MODULE"
"QT_MODULES += $$MODULE" \
"$$MODULE_PRI_EXTRA_CONTENT"
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error()
!internal_module:!no_private_module {
module_build_type += internal_module