diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-06-08 21:05:52 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-06-09 13:30:29 +0200 |
commit | 16c15cb0b582c669a1b7266c11afeec3e2fd8500 (patch) | |
tree | 6e49a13ad393c764dd254c881aaf8c4ddca765b9 | |
parent | d4548751b7b4183ab433df0927d59e3a6650625a (diff) |
CMake: Fix qt_lib_XXX_private.pri generation for internal modules
The module pri files of internal modules did not expose any include
paths. They must have both, the public and the private include paths.
Task-number: QTBUG-84781
Change-Id: I3cbe94d4e49c754e49d26b00012e668b0afbdc8f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r-- | cmake/QtBuild.cmake | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 184153543d..406b88552d 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -790,8 +790,25 @@ function(qt_generate_module_pri_file target) set(module_build_config "") endif() + if(is_fw) + set(framework_base_path "$$QT_MODULE_LIB_BASE/${module}.framework/Headers") + set(public_module_includes "${framework_base_path}") + set(public_module_frameworks "$$QT_MODULE_LIB_BASE") + set(private_module_includes "${framework_base_path}/${PROJECT_VERSION} ${framework_base_path}/${PROJECT_VERSION}/${module}") + set(module_name_in_pri "${module}") + else() + set(public_module_includes "$$QT_MODULE_INCLUDE_BASE $$QT_MODULE_INCLUDE_BASE/${module}") + set(public_module_frameworks "") + set(private_module_includes "$$QT_MODULE_INCLUDE_BASE/${module}/${PROJECT_VERSION} $$QT_MODULE_INCLUDE_BASE/${module}/${PROJECT_VERSION}/${module}") + set(module_name_in_pri "${module_versioned}") + endif() + qt_path_join(target_path ${QT_BUILD_DIR} ${INSTALL_MKSPECSDIR}/modules) - if (NOT ${arg_INTERNAL_MODULE}) + if (arg_INTERNAL_MODULE) + string(PREPEND private_module_includes "${public_module_includes} ") + set(private_module_frameworks ${public_module_frameworks}) + else() + unset(private_module_frameworks) if(arg_HEADER_MODULE) set(module_plugin_types "") else() @@ -809,19 +826,6 @@ 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}") - if(is_fw) - set(framework_base_path "$$QT_MODULE_LIB_BASE/${module}.framework/Headers") - set(public_module_includes "${framework_base_path}") - set(public_module_frameworks "$$QT_MODULE_LIB_BASE") - set(private_module_includes "${framework_base_path}/${PROJECT_VERSION} ${framework_base_path}/${PROJECT_VERSION}/${module}") - set(module_name_in_pri "${module}") - else() - set(public_module_includes "$$QT_MODULE_INCLUDE_BASE $$QT_MODULE_INCLUDE_BASE/${module}") - set(public_module_frameworks "") - set(private_module_includes "$$QT_MODULE_INCLUDE_BASE/${module}/${PROJECT_VERSION} $$QT_MODULE_INCLUDE_BASE/${module}/${PROJECT_VERSION}/${module}") - set(module_name_in_pri "${module_versioned}") - endif() - file(GENERATE OUTPUT "${pri_file_name}" CONTENT @@ -869,7 +873,7 @@ QT.${config_module_name}_private.name = ${module} QT.${config_module_name}_private.module = QT.${config_module_name}_private.libs = $$QT_MODULE_LIB_BASE QT.${config_module_name}_private.includes = ${private_module_includes} -QT.${config_module_name}_private.frameworks = +QT.${config_module_name}_private.frameworks = ${private_module_frameworks} QT.${config_module_name}_private.depends = ${private_module_dependencies} QT.${config_module_name}_private.uses = QT.${config_module_name}_private.module_config = ${joined_module_internal_config} |