summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2021-09-10 17:24:43 +0200
committerAlexey Edelev <alexey.edelev@qt.io>2021-09-16 11:15:53 +0200
commita7458b25033e10f31c987e4d4d73d8ddd852306b (patch)
treee7ca3c9c607c5f26940143fdd665fe1c32b6c135
parent8be862687db6d9fb198a577f06871ca97194ad6d (diff)
Expose cpp export related arguments for qt_internal_add_module users
Functions that use qt_internal_add_module under the hood might need to generate cpp exports, e.g. qt_internal_add_qml_module. Append cpp exports related arguments to the qt_internal_add_module arguments set. Task-number: QTBUG-90492 Change-Id: I4fd539bd1d8be4d3e57ed5b1b88dd2dbc2f5ca24 Reviewed-by: Craig Scott <craig.scott@qt.io>
-rw-r--r--cmake/QtModuleHelpers.cmake51
1 files changed, 8 insertions, 43 deletions
diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake
index 39088a64fd..d223f954e5 100644
--- a/cmake/QtModuleHelpers.cmake
+++ b/cmake/QtModuleHelpers.cmake
@@ -14,6 +14,7 @@ macro(qt_internal_get_internal_add_module_keywords option_args single_args multi
NO_GENERATE_METATYPES
GENERATE_CPP_EXPORTS # TODO: Rename to NO_GENERATE_CPP_EXPORTS once migration is done
GENERATE_METATYPES # TODO: Remove once it is not used anymore
+ GENERATE_PRIVATE_CPP_EXPORTS
)
set(${single_args}
MODULE_INCLUDE_NAME
@@ -21,6 +22,7 @@ macro(qt_internal_get_internal_add_module_keywords option_args single_args multi
CONFIG_MODULE_NAME
PRECOMPILED_HEADER
CONFIGURE_FILE_PATH
+ CPP_EXPORT_HEADER_BASE_NAME
${__default_target_info_args}
)
set(${multi_args}
@@ -34,16 +36,6 @@ macro(qt_internal_get_internal_add_module_keywords option_args single_args multi
)
endmacro()
-macro(qt_internal_get_generate_cpp_global_exports_keywords option_args single_args multi_args)
- set(${option_args}
- GENERATE_PRIVATE_CPP_EXPORTS
- )
- set(${single_args}
- CPP_EXPORT_HEADER_BASE_NAME
- )
- set(${multi_args} "")
-endmacro()
-
# This is the main entry function for creating a Qt module, that typically
# consists of a library, public header files, private header files and configurable
# features.
@@ -76,31 +68,10 @@ function(qt_internal_add_module target)
module_multi_args
)
- qt_internal_get_generate_cpp_global_exports_keywords(
- cpp_exports_option_args
- cpp_exports_single_args
- cpp_exports_multi_args
- )
-
- set(option_args
- ${module_option_args}
- ${cpp_exports_option_args}
- )
-
- set(single_args
- ${module_single_args}
- ${cpp_exports_single_args}
- )
-
- set(multi_args
- ${module_multi_args}
- ${cpp_exports_multi_args}
- )
-
qt_parse_all_arguments(arg "qt_internal_add_module"
- "${option_args}"
- "${single_args}"
- "${multi_args}"
+ "${module_option_args}"
+ "${module_single_args}"
+ "${module_multi_args}"
${ARGN}
)
@@ -965,16 +936,10 @@ endfunction()
function(qt_internal_generate_cpp_global_exports target module_define_infix
out_public_header out_private_header)
- qt_internal_get_generate_cpp_global_exports_keywords(
- option_args
- single_args
- multi_args
- )
-
cmake_parse_arguments(arg
- "${option_args}"
- "${single_args}"
- "${multi_args}" ${ARGN}
+ "GENERATE_PRIVATE_CPP_EXPORTS"
+ "CPP_EXPORT_HEADER_BASE_NAME"
+ "" ${ARGN}
)
qt_internal_module_info(module "${target}")