build-system: don't fail with multi-part path

If the CMAKE_PREFIX_PATH is a multi element path the old code failed
in very predictable ways. So instead simply fall back on the PATH to
find qmake.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2022-02-27 12:41:09 -08:00
parent f8eb5140e2
commit 12e61e8c12

View file

@ -221,7 +221,8 @@ echo Building from "$SRC", installing in "$INSTALL_ROOT"
# find qmake # find qmake
if [ -n "$CMAKE_PREFIX_PATH" ] ; then if [ -n "$CMAKE_PREFIX_PATH" ] ; then
QMAKE=$CMAKE_PREFIX_PATH/../../bin/qmake QMAKE=$CMAKE_PREFIX_PATH/../../bin/qmake
else fi
if [[ -z $QMAKE || ! -x $QMAKE ]] ; then
hash qmake > /dev/null 2> /dev/null && QMAKE=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-qt5 > /dev/null 2> /dev/null && QMAKE=qmake-qt5
[ -z $QMAKE ] && echo "cannot find qmake or qmake-qt5" && exit 1 [ -z $QMAKE ] && echo "cannot find qmake or qmake-qt5" && exit 1