summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2023-11-28 14:01:19 +0100
committerAlexey Edelev <alexey.edelev@qt.io>2024-02-09 23:00:04 +0100
commitd2f70151847673e23412f29824396aebeedbc1cc (patch)
tree4163ab4175f63116bb1978364a4db99054087047 /cmake
parent1a7edf3ba7bc8f7cdcd11eae973582158b4ecff8 (diff)
Introduce NO_GENERATE_CPP_EXPORTS argument for qt_internal_add_module
The argument is inverted GENERATE_CPP_EXPORTS argument. Use it explicitly for the modules that do not require the autogenerated cpp exports. Task-number: QTBUG-90492 Change-Id: Ic67772ba9ed5e40f132a97e7d6844102ad023ff3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtModuleHelpers.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake
index 4a64036c7c..602720cebf 100644
--- a/cmake/QtModuleHelpers.cmake
+++ b/cmake/QtModuleHelpers.cmake
@@ -16,7 +16,8 @@ macro(qt_internal_get_internal_add_module_keywords option_args single_args multi
NO_ADDITIONAL_TARGET_INFO
NO_GENERATE_METATYPES
NO_HEADERSCLEAN_CHECK
- GENERATE_CPP_EXPORTS
+ GENERATE_CPP_EXPORTS # deprecated
+ NO_GENERATE_CPP_EXPORTS
NO_UNITY_BUILD
)
set(${single_args}
@@ -422,7 +423,8 @@ function(qt_internal_add_module target)
# We should not generate export headers if module is defined as pure STATIC.
# Static libraries don't need to export their symbols, and corner cases when sources are
# also used in shared libraries, should be handled manually.
- if(arg_GENERATE_CPP_EXPORTS AND NOT arg_STATIC)
+ if((NOT arg_NO_GENERATE_CPP_EXPORTS OR arg_GENERATE_CPP_EXPORTS) AND NOT arg_STATIC
+ AND NOT arg_HEADER_MODULE)
if(arg_CPP_EXPORT_HEADER_BASE_NAME)
set(cpp_export_header_base_name
"CPP_EXPORT_HEADER_BASE_NAME;${arg_CPP_EXPORT_HEADER_BASE_NAME}"