Skip to content

Commit

Permalink
Pass QT_BUILD_STANDALONE_TESTS to Android external project if defined
Browse files Browse the repository at this point in the history
If we configure qtbase standalone tests for multiple Android ABIs,
external project also needs the QT_BUILD_STANDALONE_TESTS flag enabled
to avoid configuring the whole qtbase but not only tests.

TODO: Need to forward all cache variables that are defined by user to
the external project since otherwise the configuration of the external
project will differ. Created QTBUG-99537 to track this.

Pick-to: 6.3
Change-Id: I3aec1391c850fb37696dc50416e0ff2a2646e759
Reviewed-by: Joerg Bornemann <[email protected]>
  • Loading branch information
semlanik committed Jan 4, 2022
1 parent d624633 commit 18e62ed
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/corelib/Qt6AndroidMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,13 @@ function(_qt_internal_configure_android_multiabi_target target)
else()
set(config_arg "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
endif()

# The flag is needed when building qt standalone tests only to avoid building
# qt repo itself
if(QT_BUILD_STANDALONE_TESTS)
list(APPEND extra_cmake_args "-DQT_BUILD_STANDALONE_TESTS=ON")
endif()

set(android_abi_build_dir "${CMAKE_BINARY_DIR}/android_abi_builds/${abi}")
get_property(abi_external_projects GLOBAL
PROPERTY _qt_internal_abi_external_projects)
Expand All @@ -899,6 +906,7 @@ function(_qt_internal_configure_android_multiabi_target target)
"-DQT_IS_ANDROID_MULTI_ABI_EXTERNAL_PROJECT=ON"
"-DQT_INTERNAL_ANDROID_MULTI_ABI_BINARY_DIR=${CMAKE_BINARY_DIR}"
"${config_arg}"
"${extra_cmake_args}"
EXCLUDE_FROM_ALL TRUE
BUILD_COMMAND "" # avoid top-level build of external project
)
Expand Down

0 comments on commit 18e62ed

Please sign in to comment.