cmake: Produce internal module pris like qmake does
qmake treats internal modules as just the regular module file, but with a _private suffix, as opposed to the current cmake logic, that treats it as the private module file, resulting in missing e.g. the Qt.foo.module entry. Change-Id: Id55ca4c23921656d5abfd1d0fdf6430d4fe120bf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
155ee2bbd7
commit
83ad237771
@ -199,11 +199,16 @@ function(qt_generate_module_pri_file target)
|
|||||||
unset(private_module_includes)
|
unset(private_module_includes)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
qt_path_join(target_path ${QT_BUILD_DIR} ${INSTALL_MKSPECSDIR}/modules)
|
set(pri_data_cmake_file "qt_lib_${config_module_name}_private.cmake")
|
||||||
|
|
||||||
|
set(config_module_name_base "${config_module_name}")
|
||||||
|
|
||||||
if (arg_INTERNAL_MODULE)
|
if (arg_INTERNAL_MODULE)
|
||||||
string(PREPEND private_module_includes "${public_module_includes} ")
|
string(APPEND config_module_name "_private")
|
||||||
set(private_module_frameworks ${public_module_frameworks})
|
endif()
|
||||||
else()
|
|
||||||
|
qt_path_join(target_path ${QT_BUILD_DIR} ${INSTALL_MKSPECSDIR}/modules)
|
||||||
|
|
||||||
unset(private_module_frameworks)
|
unset(private_module_frameworks)
|
||||||
if(arg_HEADER_MODULE)
|
if(arg_HEADER_MODULE)
|
||||||
set(module_plugin_types "")
|
set(module_plugin_types "")
|
||||||
@ -251,12 +256,11 @@ QT.${config_module_name}.DEFINES = ${joined_target_defines}
|
|||||||
QT.${config_module_name}.enabled_features = ${enabled_features}
|
QT.${config_module_name}.enabled_features = ${enabled_features}
|
||||||
QT.${config_module_name}.disabled_features = ${disabled_features}${module_build_config}
|
QT.${config_module_name}.disabled_features = ${disabled_features}${module_build_config}
|
||||||
QT_CONFIG += ${enabled_features}
|
QT_CONFIG += ${enabled_features}
|
||||||
QT_MODULES += ${config_module_name}
|
QT_MODULES += ${config_module_name_base}
|
||||||
"
|
"
|
||||||
)
|
)
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT arg_NO_PRIVATE_MODULE)
|
if (NOT arg_NO_PRIVATE_MODULE AND NOT arg_INTERNAL_MODULE)
|
||||||
set(pri_data_cmake_file "qt_lib_${config_module_name}_private.cmake")
|
set(pri_data_cmake_file "qt_lib_${config_module_name}_private.cmake")
|
||||||
qt_generate_qmake_libraries_pri_content(${config_module_name} "${CMAKE_CURRENT_BINARY_DIR}"
|
qt_generate_qmake_libraries_pri_content(${config_module_name} "${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
${pri_data_cmake_file})
|
${pri_data_cmake_file})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user