From 2112bd8e080954e8be27dcacc9f9759ea0576f87 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 13 Nov 2022 18:59:44 +0100 Subject: [PATCH] build-system: make -build-with-qt6 work -build-with-qt6 did not work for me, because the flag is ignored when selecting the qmake executable. It would find the system-wide qmake executable, which is Qt5 and then decide to build with Qt5. When the flag is set, try to search for a Qt6 version of qmake first. On Ubuntu based distros this seems to be qmake6 Signed-off-by: Berthold Stoeger --- scripts/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index f78750215..f3ff1cdd5 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -253,7 +253,9 @@ if [ -n "$CMAKE_PREFIX_PATH" ] ; then QMAKE=$CMAKE_PREFIX_PATH/../../bin/qmake fi if [[ -z $QMAKE || ! -x $QMAKE ]] ; then - hash qmake > /dev/null 2> /dev/null && QMAKE=qmake + [ -z $QMAKE ] && [ "$BUILD_WITH_QT6" = "1" ] && hash qmake6 > /dev/null 2> /dev/null && QMAKE=qmake6 + [ -z $QMAKE ] && [ "$BUILD_WITH_QT6" = "1" ] && hash qmake-qt6 > /dev/null 2> /dev/null && QMAKE=qmake-qt6 + [ -z $QMAKE ] && hash qmake > /dev/null 2> /dev/null && QMAKE=qmake [ -z $QMAKE ] && hash qmake-qt5 > /dev/null 2> /dev/null && QMAKE=qmake-qt5 [ -z $QMAKE ] && hash qmake-qt6 > /dev/null 2> /dev/null && QMAKE=qmake-qt6 [ -z $QMAKE ] && echo "cannot find qmake, qmake-qt5, or qmake-qt6" && exit 1