Fix the naming of the config header files for private modules
Perform a file name of the config header before adding a '_private' suffix. TODO: It makes sense to revisit the use of the CONFIG_MODULE_NAME variable since the variable is used for different purposes and mutate with use. Amends 8aee7c6b29be5a0ee7d5e7cfcb5f2db762b2e28b Pick-to: 6.2 Fixes: QTBUG-94568 Change-Id: Id5aaf8d423ec8b94afffe4641b54dab94b5453fb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
fe6d84d96e
commit
ed92cb30e4
@ -131,6 +131,9 @@ function(qt_internal_add_module target)
|
|||||||
set(arg_CONFIG_MODULE_NAME "${module_lower}")
|
set(arg_CONFIG_MODULE_NAME "${module_lower}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(module_config_header "qt${arg_CONFIG_MODULE_NAME}-config.h")
|
||||||
|
set(module_config_private_header "qt${arg_CONFIG_MODULE_NAME}-config_p.h")
|
||||||
|
|
||||||
# Module define needs to take into account the config module name.
|
# Module define needs to take into account the config module name.
|
||||||
string(TOUPPER "${arg_CONFIG_MODULE_NAME}" module_define_infix)
|
string(TOUPPER "${arg_CONFIG_MODULE_NAME}" module_define_infix)
|
||||||
string(REPLACE "-" "_" module_define_infix "${module_define_infix}")
|
string(REPLACE "-" "_" module_define_infix "${module_define_infix}")
|
||||||
@ -499,16 +502,20 @@ function(qt_internal_add_module target)
|
|||||||
if(EXISTS "${configureFile}" AND NOT arg_NO_CONFIG_HEADER_FILE)
|
if(EXISTS "${configureFile}" AND NOT arg_NO_CONFIG_HEADER_FILE)
|
||||||
qt_feature_module_begin(
|
qt_feature_module_begin(
|
||||||
LIBRARY "${target}"
|
LIBRARY "${target}"
|
||||||
PUBLIC_FILE "qt${arg_CONFIG_MODULE_NAME}-config.h"
|
PUBLIC_FILE "${module_config_header}"
|
||||||
PRIVATE_FILE "qt${arg_CONFIG_MODULE_NAME}-config_p.h"
|
PRIVATE_FILE "${module_config_private_header}"
|
||||||
PUBLIC_DEPENDENCIES ${arg_FEATURE_DEPENDENCIES}
|
PUBLIC_DEPENDENCIES ${arg_FEATURE_DEPENDENCIES}
|
||||||
PRIVATE_DEPENDENCIES ${arg_FEATURE_DEPENDENCIES}
|
PRIVATE_DEPENDENCIES ${arg_FEATURE_DEPENDENCIES}
|
||||||
)
|
)
|
||||||
include(${configureFile})
|
include(${configureFile})
|
||||||
qt_feature_module_end("${target}")
|
qt_feature_module_end("${target}")
|
||||||
|
|
||||||
set_property(TARGET "${target}" APPEND PROPERTY PUBLIC_HEADER "${CMAKE_CURRENT_BINARY_DIR}/qt${arg_CONFIG_MODULE_NAME}-config.h")
|
set_property(TARGET "${target}" APPEND PROPERTY
|
||||||
set_property(TARGET "${target}" APPEND PROPERTY PRIVATE_HEADER "${CMAKE_CURRENT_BINARY_DIR}/qt${arg_CONFIG_MODULE_NAME}-config_p.h")
|
PUBLIC_HEADER "${CMAKE_CURRENT_BINARY_DIR}/${module_config_header}"
|
||||||
|
)
|
||||||
|
set_property(TARGET "${target}" APPEND PROPERTY
|
||||||
|
PRIVATE_HEADER "${CMAKE_CURRENT_BINARY_DIR}/${module_config_private_header}"
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT arg_HEADER_MODULE)
|
if(NOT arg_HEADER_MODULE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user