qtbase-native: don't try to find tools

QT_BUILD_TOOLS_WHEN_CROSSCOMPILING triggered qtbase-native
to try to find tools from QT_HOST_PATH, which obviously
doesn't exists yet. Use it only for target and nativesdk
builds.

Fixes compilation failure:
 | -- Searching for tool 'Qt6::moc' in package Qt6CoreTools.
 | CMake Error at cmake/QtToolHelpers.cmake:122 (message):
 |   Neither QT_HOST_PATH_CMAKE_DIR nor Qt6HostInfo_DIR} available.

Change-Id: I260526c08f48f179049eb4b0ab3e6561958d0a53
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 3bb76773a8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Samuli Piippo 2021-11-05 15:18:52 +02:00 committed by Qt Cherry-pick Bot
parent 181cbf3683
commit fb8e8e8dba

View File

@ -4,14 +4,15 @@ DEPENDS:prepend = "qtbase-native "
EXTRA_OECMAKE += "\
-DQT_CMAKE_DEBUG_EXTEND_TARGET=ON \
-DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON \
-DQT_BUILD_INTERNALS_NO_FORCE_SET_INSTALL_PREFIX=ON \
"
EXTRA_OECMAKE:append:class-target = "\
-DQT_HOST_PATH:PATH=${RECIPE_SYSROOT_NATIVE}/${prefix_native}/ \
-DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON \
"
EXTRA_OECMAKE:append:class-nativesdk = "\
-DQT_HOST_PATH:PATH=${RECIPE_SYSROOT_NATIVE}/${prefix_native}/ \
-DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON \
"
EXTRA_OECMAKE += "\