CMake: Fix namespace builds for qmake mixing
While we recorded the namespace define in the CMake generated Targets
file, we also have to record it in qt_lib_core.pri, so that qmake
knows to use the define when building other modules / apps.
It does scare me what other MODULE_DEFINES we might be missing, and
that we should perhaps put all public modules defines into the
generated module .pri files.
Amends 3452b08df6
Task-number: QTBUG-84781
Task-number: QTBUG-84881
Change-Id: I3175aa9991a06a4541eb0dd153ba2e6e58c019ce
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
bb10
parent
f1beb28c46
commit
ed20023760
|
|
@ -831,6 +831,11 @@ function(qt_generate_module_pri_file target)
|
|||
qt_path_join(pri_file_name "${target_path}" "qt_lib_${config_module_name}.pri")
|
||||
list(APPEND pri_files "${pri_file_name}")
|
||||
|
||||
set(module_extra_defines "")
|
||||
if(config_module_name STREQUAL core AND QT_NAMESPACE)
|
||||
set(module_extra_defines "QT_NAMESPACE=${QT_NAMESPACE}")
|
||||
endif()
|
||||
|
||||
file(GENERATE
|
||||
OUTPUT "${pri_file_name}"
|
||||
CONTENT
|
||||
|
|
@ -845,7 +850,7 @@ QT.${config_module_name}.plugin_types = ${module_plugin_types}
|
|||
QT.${config_module_name}.depends = ${public_module_dependencies}
|
||||
QT.${config_module_name}.uses =
|
||||
QT.${config_module_name}.module_config = ${joined_module_internal_config}
|
||||
QT.${config_module_name}.DEFINES = QT_${module_define}_LIB
|
||||
QT.${config_module_name}.DEFINES = QT_${module_define}_LIB ${module_extra_defines}
|
||||
QT.${config_module_name}.enabled_features = ${enabled_features}
|
||||
QT.${config_module_name}.disabled_features = ${disabled_features}${module_build_config}
|
||||
QT_CONFIG += ${enabled_features}
|
||||
|
|
|
|||
Loading…
Reference in New Issue