CMake: Fix finalizers not being run for android executables
Android executables are actually loadable modules, not executables.
Instead of checking for the target type if it's a MODULE, be explicit
and mark the target with a special qt property that we then use to
decide whether the finalizer should run.
Amends c4df673dd9
Change-Id: I5330d80d39488cfda6ebe07e2a1883200a796be8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
135dbdb553
commit
76e4b13e7c
@ -518,6 +518,7 @@ function(_qt_internal_create_executable target)
|
||||
set_property(TARGET "${target}" PROPERTY OBJC_VISIBILITY_PRESET default)
|
||||
set_property(TARGET "${target}" PROPERTY OBJCXX_VISIBILITY_PRESET default)
|
||||
qt6_android_apply_arch_suffix("${target}")
|
||||
set_property(TARGET "${target}" PROPERTY _qt_is_android_executable TRUE)
|
||||
else()
|
||||
add_executable("${target}" ${ARGN})
|
||||
endif()
|
||||
@ -606,7 +607,9 @@ function(qt6_finalize_target target)
|
||||
endif()
|
||||
|
||||
get_target_property(target_type ${target} TYPE)
|
||||
if(target_type STREQUAL "EXECUTABLE")
|
||||
get_target_property(is_android_executable "${target}" _qt_is_android_executable)
|
||||
|
||||
if(target_type STREQUAL "EXECUTABLE" OR is_android_executable)
|
||||
_qt_internal_finalize_executable(${ARGV})
|
||||
endif()
|
||||
endfunction()
|
||||
|
Loading…
Reference in New Issue
Block a user