CMake: Tests on iOS must be app bundles to be runnable

Task-number: QTBUG-104754
Change-Id: I05053d0f242f45e56e7a95ac75f5ef63ca8a5e0e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit c76bf583504091f91f119135befdef0e02a5ddf5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Alexandru Croitor 2022-08-12 16:37:58 +02:00 committed by Qt Cherry-pick Bot
parent 15f15fa8db
commit d5eae411bc

View File

@ -33,6 +33,10 @@ function(qt_internal_add_benchmark target)
${exec_args}
)
# Benchmarks on iOS must be app bundles.
if(IOS)
set_target_properties(${target} PROPERTIES MACOSX_BUNDLE TRUE)
endif()
qt_internal_add_repo_local_defines(${target})
@ -98,6 +102,11 @@ function(qt_internal_add_manual_test target)
${exec_args}
)
# Tests on iOS must be app bundles.
if(IOS)
set_target_properties(${target} PROPERTIES MACOSX_BUNDLE TRUE)
endif()
# Disable the QT_NO_NARROWING_CONVERSIONS_IN_CONNECT define for manual tests
qt_internal_undefine_global_definition(${target} QT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
@ -282,6 +291,11 @@ function(qt_internal_add_test name)
# and not print anything.
set_property(TARGET "${name}" PROPERTY WIN32_EXECUTABLE FALSE)
# Tests on iOS must be app bundles.
if(IOS)
set_target_properties(${name} PROPERTIES MACOSX_BUNDLE TRUE)
endif()
# QMLTest specifics
qt_internal_extend_target("${name}" CONDITION arg_QMLTEST
PUBLIC_LIBRARIES ${QT_CMAKE_EXPORT_NAMESPACE}::QuickTest