cmake: Fix logic for adding staticlib to module pri

Change-Id: I2426e78bb509a37e7e3924506903cd84732f88d8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Tor Arne Vestbø 2020-10-16 12:42:46 +02:00
parent df8489816b
commit f6012c4a56

View File

@ -153,13 +153,9 @@ function(qt_generate_module_pri_file target)
endforeach()
set(module_internal_config v2)
if(NOT QT_FEATURE_shared)
list(APPEND module_internal_config staticlib)
endif()
if(arg_INTERNAL_MODULE)
list(APPEND module_internal_config internal_module)
endif()
get_target_property(target_type ${target} TYPE)
if (NOT target_type STREQUAL "INTERFACE_LIBRARY")
get_target_property(is_fw ${target} FRAMEWORK)
@ -167,6 +163,9 @@ function(qt_generate_module_pri_file target)
list(APPEND module_internal_config lib_bundle)
endif()
endif()
if(target_type STREQUAL "STATIC_LIBRARY")
list(APPEND module_internal_config staticlib)
endif()
# TODO: Add the value 'ltcg' to module_internal_config if LTCG is turned on.