diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-12-29 12:13:20 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-12-29 13:39:16 -0800 |
commit | 8f153384b5c5dc0cc332b751d4486d2e62363827 (patch) | |
tree | 61b29aa2fcf64654b0da88e501d61c75eb3ffaee /scripts | |
parent | 4fb99680f39daa4512aa6cfbc867f45808e2125a (diff) | |
download | subsurface-8f153384b5c5dc0cc332b751d4486d2e62363827.tar.gz |
build script: move related code closer together
This just makes it more obvious what we are doing.
This appears only necessary on macOS.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build.sh | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/scripts/build.sh b/scripts/build.sh index dccf0854b..1c87275ae 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -210,6 +210,21 @@ else [ -z $QMAKE ] && echo "cannot find qmake or qmake-qt5" && exit 1 fi +# it's not entirely clear why we only set this on macOS, but this appears to be what works +if [ "$PLATFORM" = Darwin ] ; then + if [ -z "$CMAKE_PREFIX_PATH" ] ; then + # we already found qmake and can get the right path information from that + libdir=$($QMAKE -query QT_INSTALL_LIBS) + if [ $? -eq 0 ]; then + export CMAKE_PREFIX_PATH=$libdir/cmake + else + echo "something is broken with the Qt install" + exit 1 + fi + fi +fi + + # on Debian and Ubuntu based systems, the private QtLocation and # QtPositioning headers aren't bundled. Download them if necessary. if [ "$PLATFORM" = Linux ] ; then @@ -470,19 +485,6 @@ make install # make sure we know where the libdivecomputer.a was installed - sometimes it ends up in lib64, sometimes in lib STATIC_LIBDC="$INSTALL_ROOT/$(grep ^libdir Makefile | cut -d/ -f2)/libdivecomputer.a" -if [ "$PLATFORM" = Darwin ] ; then - if [ -z "$CMAKE_PREFIX_PATH" ] ; then - # we already found qmake and can get the right path information from that - libdir=$($QMAKE -query QT_INSTALL_LIBS) - if [ $? -eq 0 ]; then - export CMAKE_PREFIX_PATH=$libdir/cmake - else - echo "something is broken with the Qt install" - exit 1 - fi - fi -fi - cd "$SRC" if [ "$QUICK" != "1" ] && [ "$BUILD_DESKTOP$BUILD_MOBILE" != "" ] ; then |