Updated unix debug build script to allow for selectable Qt5 or Qt6 build.

This commit is contained in:
mjbudd77 2022-03-11 21:37:41 -05:00
parent 9b6ab85424
commit cf8c496a59
1 changed files with 22 additions and 3 deletions

View File

@ -2,6 +2,7 @@
CLEAN_BUILD=0; CLEAN_BUILD=0;
MAKE_ARGS=""; MAKE_ARGS="";
QT_MAJOR_VERSION=5;
while test $# -gt 0 while test $# -gt 0
do do
@ -16,6 +17,9 @@ do
-j) shift; MAKE_ARGS+=" -j$1 "; -j) shift; MAKE_ARGS+=" -j$1 ";
;; ;;
-qt) shift; QT_MAJOR_VERSION="$1";
;;
esac esac
shift; shift;
done done
@ -45,9 +49,24 @@ CMAKE_ARGS="\
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON "; -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ";
if [[ "$OSTYPE" == "darwin"* ]]; then if [[ "$OSTYPE" == "darwin"* ]]; then
export Qt5_DIR=`brew --prefix qt5`
echo "Qt5_DIR=$Qt5_DIR"; if [ "$QT_MAJOR_VERSION" == "6" ]; then
CMAKE_ARGS+=" -DCMAKE_PREFIX_PATH=`brew --prefix qt5` "; export Qt6_DIR=`brew --prefix qt6`
echo "Qt6_DIR=$Qt6_DIR";
CMAKE_ARGS+=" -DCMAKE_PREFIX_PATH=`brew --prefix qt6` ";
else
export Qt5_DIR=`brew --prefix qt5`
echo "Qt5_DIR=$Qt5_DIR";
CMAKE_ARGS+=" -DCMAKE_PREFIX_PATH=`brew --prefix qt5` ";
fi
fi
if [ ! -z "$Qt_DIR" ]; then
CMAKE_ARGS+=" -DCMAKE_PREFIX_PATH=$Qt_DIR ";
fi
if [ "$QT_MAJOR_VERSION" == "6" ]; then
CMAKE_ARGS+=" -DQT6=1 ";
fi fi
#echo $CMAKE_ARGS; #echo $CMAKE_ARGS;