Avoid to call _qt_internal_set_up_static_runtime_library() twice

Pick-to: 6.2
Change-Id: I28985470b3e0b88befbbd2d62a027670d7d6c822
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Li Xinwei 2021-08-02 18:16:38 +08:00
parent ba3e1fe09b
commit a251443949
6 changed files with 4 additions and 7 deletions

View File

@ -74,6 +74,7 @@ function(qt_internal_add_executable name)
endif() endif()
qt_set_common_target_properties(${name}) qt_set_common_target_properties(${name})
_qt_internal_set_up_static_runtime_library(${name})
if(ANDROID) if(ANDROID)
# On our qmake builds we don't compile the executables with # On our qmake builds we don't compile the executables with
# visibility=hidden. Not having this flag set will cause the # visibility=hidden. Not having this flag set will cause the

View File

@ -236,14 +236,13 @@ function(__qt_internal_add_static_plugin_init_object_library
__qt_internal_get_static_plugin_init_target_name("${plugin_target}" plugin_init_target) __qt_internal_get_static_plugin_init_target_name("${plugin_target}" plugin_init_target)
add_library("${plugin_init_target}" OBJECT "${generated_qt_plugin_file_name}") qt6_add_library("${plugin_init_target}" OBJECT "${generated_qt_plugin_file_name}")
target_link_libraries(${plugin_init_target} target_link_libraries(${plugin_init_target}
PRIVATE PRIVATE
# Core provides the symbols needed by Q_IMPORT_PLUGIN. # Core provides the symbols needed by Q_IMPORT_PLUGIN.
${QT_CMAKE_EXPORT_NAMESPACE}::Core ${QT_CMAKE_EXPORT_NAMESPACE}::Core
) )
_qt_internal_set_up_static_runtime_library("${plugin_init_target}")
set_property(TARGET ${plugin_init_target} PROPERTY _is_qt_plugin_init_target TRUE) set_property(TARGET ${plugin_init_target} PROPERTY _is_qt_plugin_init_target TRUE)
set_property(TARGET ${plugin_init_target} APPEND PROPERTY set_property(TARGET ${plugin_init_target} APPEND PROPERTY

View File

@ -88,6 +88,5 @@ function(qt_internal_record_rcc_object_files target resource_targets)
set_property(TARGET ${target} APPEND PROPERTY _qt_rcc_objects "${rcc_object_file_path}") set_property(TARGET ${target} APPEND PROPERTY _qt_rcc_objects "${rcc_object_file_path}")
qt_internal_link_internal_platform_for_object_library("${out_target}") qt_internal_link_internal_platform_for_object_library("${out_target}")
qt_set_common_target_properties(${out_target})
endforeach() endforeach()
endfunction() endfunction()

View File

@ -188,7 +188,6 @@ function(qt_set_common_target_properties target)
OBJCXX_VISIBILITY_PRESET hidden OBJCXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN 1) VISIBILITY_INLINES_HIDDEN 1)
endif() endif()
_qt_internal_set_up_static_runtime_library("${target}")
qt_internal_set_compile_pdb_names("${target}") qt_internal_set_compile_pdb_names("${target}")
endfunction() endfunction()

View File

@ -5,7 +5,7 @@
##################################################################### #####################################################################
# The common object library, that should be available regardless of the presence of qmake. # The common object library, that should be available regardless of the presence of qmake.
add_library(QtLibraryInfo OBJECT qt_add_library(QtLibraryInfo OBJECT
library/proitems.cpp library/proitems.h library/proitems.cpp library/proitems.h
library/qmake_global.h library/qmake_global.h
property.cpp property.h property.cpp property.h
@ -42,7 +42,6 @@ target_compile_definitions(QtLibraryInfo PUBLIC
QT_TARGET_MKSPEC="${QT_QMAKE_TARGET_MKSPEC}" QT_TARGET_MKSPEC="${QT_QMAKE_TARGET_MKSPEC}"
QT_HOST_DATADIR="${hostdatadir}" QT_HOST_DATADIR="${hostdatadir}"
) )
qt_set_common_target_properties(QtLibraryInfo)
# qmake is out of any module, so we manually evaluate the required features. # qmake is out of any module, so we manually evaluate the required features.
include("${CMAKE_CURRENT_SOURCE_DIR}/configure.cmake") include("${CMAKE_CURRENT_SOURCE_DIR}/configure.cmake")

View File

@ -7,7 +7,7 @@
# special case begin # special case begin
# The bootstrap library has a few manual tweaks compared to other # The bootstrap library has a few manual tweaks compared to other
# libraries. # libraries.
add_library(Bootstrap STATIC) qt_add_library(Bootstrap STATIC)
# special case end # special case end
qt_internal_extend_target(Bootstrap qt_internal_extend_target(Bootstrap
SOURCES SOURCES