mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
build.sh: don't override existing CMAKE_PREFIX_PATH
If we already explicitly point at one Qt installation, don't override with another one. Also, support all the way up to Qt 5.9.1 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
6bba524288
commit
36d462e0f9
1 changed files with 24 additions and 19 deletions
|
@ -174,10 +174,15 @@ if [ $BUILDMARBLE = 1 ]; then
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cd build
|
cd build
|
||||||
if [ $PLATFORM = Darwin ] ; then
|
if [ $PLATFORM = Darwin ] ; then
|
||||||
|
if [ -z "$CMAKE_PREFIX_PATH" ] ; then
|
||||||
# qmake in PATH?
|
# qmake in PATH?
|
||||||
libdir=`qmake -query QT_INSTALL_LIBS`
|
libdir=`qmake -query QT_INSTALL_LIBS`
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
export CMAKE_PREFIX_PATH=$libdir/cmake
|
export CMAKE_PREFIX_PATH=$libdir/cmake
|
||||||
|
elif [ -d "$HOME/Qt/5.9.1" ] ; then
|
||||||
|
export CMAKE_PREFIX_PATH=~/Qt/5.9.1/clang_64/lib/cmake
|
||||||
|
elif [ -d "$HOME/Qt/5.9" ] ; then
|
||||||
|
export CMAKE_PREFIX_PATH=~/Qt/5.9/clang_64/lib/cmake
|
||||||
elif [ -d "$HOME/Qt/5.8" ] ; then
|
elif [ -d "$HOME/Qt/5.8" ] ; then
|
||||||
export CMAKE_PREFIX_PATH=~/Qt/5.8/clang_64/lib/cmake
|
export CMAKE_PREFIX_PATH=~/Qt/5.8/clang_64/lib/cmake
|
||||||
elif [ -d "$HOME/Qt/5.7" ] ; then
|
elif [ -d "$HOME/Qt/5.7" ] ; then
|
||||||
|
@ -190,10 +195,10 @@ if [ $BUILDMARBLE = 1 ]; then
|
||||||
# Homebrew location for qt5 package
|
# Homebrew location for qt5 package
|
||||||
export CMAKE_PREFIX_PATH=/usr/local/opt/qt5/lib/cmake
|
export CMAKE_PREFIX_PATH=/usr/local/opt/qt5/lib/cmake
|
||||||
else
|
else
|
||||||
echo "cannot find Qt 5.5 or 5.6 in ~/Qt"
|
echo "cannot find Qt 5.5 or newer in ~/Qt"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DQTONLY=TRUE -DQT5BUILD=ON \
|
cmake -DCMAKE_BUILD_TYPE=Release -DQTONLY=TRUE -DQT5BUILD=ON \
|
||||||
|
|
Loading…
Add table
Reference in a new issue