From e19f2af481f061a4dc1308a21101c8dc723dc72c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Wed, 10 Aug 2022 22:43:23 +0700 Subject: [PATCH] build-style/cmake: only set QT_HOST_PATH on cross build They're used by QtBuildInternals to find other components configuration. With QT_HOST_PATH and QT_HOST_PATH_CMAKE_DIR set, cmake will only look into those directories. --- common/build-style/cmake.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh index e1efd9cc658..211d3906378 100644 --- a/common/build-style/cmake.sh +++ b/common/build-style/cmake.sh @@ -54,10 +54,13 @@ _EOF cmake_args+=" -DCMAKE_INSTALL_PREFIX=/usr" cmake_args+=" -DCMAKE_BUILD_TYPE=None" cmake_args+=" -DCMAKE_INSTALL_LIBDIR=lib${XBPS_TARGET_WORDSIZE}" - cmake_args+=" -DQT_HOST_PATH=/usr" - # QT_HOST_PATH isn't enough in my system, - # which have binfmts support on and off - cmake_args+=" -DQT_HOST_PATH_CMAKE_DIR=/usr/lib/cmake" + + if [ "$CROSS_BUILD" ]; then + cmake_args+=" -DQT_HOST_PATH=/usr" + # QT_HOST_PATH isn't enough in my system, + # which have binfmts support on and off + cmake_args+=" -DQT_HOST_PATH_CMAKE_DIR=/usr/lib/cmake" + fi if [[ $build_helper = *"qemu"* ]]; then echo "SET(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static)" \