CMake: Fix Android top-level prefix build

During a top-level prefix build, while configuring qtsvg,
Qt6BuildInternalsConfig tries to include QtBuildInternalsAndroid.cmake
but such files are not copied by qt_copy_or_install() at configure
time.

We need to use the "module" form of include() to take CMAKE_MODULE_PATH
into account. Then QtBuildInternalsAndroid.cmake can be loaded from the
source tree.

The include's current form was introduced in commit
3cb9ee3a5b36e2c10dbaf1564852472e7e02a1ae without further
explanation. Assuming an accidental change.

Task-number: QTBUG-88460
Change-Id: If06ac715fae3c2bebbeffca44b7e07265ffb0f71
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 9e0fb9c4fbe7a11c09a70d7ea1be97405c6bf0f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Joerg Bornemann 2020-11-19 13:41:01 +01:00 committed by Qt Cherry-pick Bot
parent 3965eb2305
commit cc26c1e025

View File

@ -523,5 +523,5 @@ macro(qt_examples_build_end)
endmacro()
if (ANDROID)
include(${CMAKE_CURRENT_LIST_DIR}/QtBuildInternalsAndroid.cmake)
include(QtBuildInternals/QtBuildInternalsAndroid)
endif()