diff options
Diffstat (limited to 'cmake/QtModuleHelpers.cmake')
-rw-r--r-- | cmake/QtModuleHelpers.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake index 502af4f05e..deb5b001e1 100644 --- a/cmake/QtModuleHelpers.cmake +++ b/cmake/QtModuleHelpers.cmake @@ -312,7 +312,10 @@ function(qt_internal_add_module target) set_property(TARGET ${target} APPEND PROPERTY _qt_module_timestamp_dependencies "${module_headers_public}") - if(arg_GENERATE_CPP_EXPORTS) + # 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(arg_CPP_EXPORT_HEADER_BASE_NAME) set(cpp_export_header_base_name "CPP_EXPORT_HEADER_BASE_NAME;${arg_CPP_EXPORT_HEADER_BASE_NAME}" |