CMake: Record static libs and target type in for deployment
In <build-dir>/.qt/QtDeployTargets.cmake we recorded deployable targets and their file path. We skipped static libraries, because we don't consider these deployable. However, we need information about static library targets too when deploying QML plugins: we need to know that they are "built by us" in order to properly skip them. Now, we record STATIC_LIBRARY targets too and also record the type of each target. Pick-to: 6.7 Task-number: QTBUG-124771 Change-Id: Ic1ef33a3295458c372c2bc9f24ecce43f17e7321 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
a0759dd420
commit
519a47e870
@ -3155,13 +3155,17 @@ endfunction()
|
||||
# Write deployment information for the targets of the project.
|
||||
function(_qt_internal_write_target_deploy_info out_file)
|
||||
set(targets "")
|
||||
set(dynamic_target_types EXECUTABLE SHARED_LIBRARY MODULE_LIBRARY)
|
||||
_qt_internal_collect_buildsystem_targets(targets
|
||||
"${CMAKE_SOURCE_DIR}" INCLUDE EXECUTABLE SHARED_LIBRARY MODULE_LIBRARY)
|
||||
"${CMAKE_SOURCE_DIR}" INCLUDE ${dynamic_target_types} STATIC_LIBRARY)
|
||||
set(content "")
|
||||
foreach(target IN LISTS targets)
|
||||
set(var_prefix "__QT_DEPLOY_TARGET_${target}")
|
||||
string(APPEND content "set(${var_prefix}_FILE $<TARGET_FILE:${target}>)\n")
|
||||
if(WIN32 AND CMAKE_VERSION GREATER_EQUAL "3.21")
|
||||
get_target_property(target_type ${target} TYPE)
|
||||
string(APPEND content "set(${var_prefix}_TYPE ${target_type})\n")
|
||||
if(WIN32 AND CMAKE_VERSION GREATER_EQUAL "3.21"
|
||||
AND target_type IN_LIST dynamic_target_types)
|
||||
string(APPEND content
|
||||
"set(${var_prefix}_RUNTIME_DLLS $<TARGET_RUNTIME_DLLS:${target}>)\n")
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user