summaryrefslogtreecommitdiffstats
path: root/scripts/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build.sh')
-rwxr-xr-xscripts/build.sh17
1 files changed, 15 insertions, 2 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
index b18b1197d..64a92f678 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -141,6 +141,9 @@ if ! git checkout Subsurface-testing ; then
fi
mkdir -p build
cd build
+if [ $PLATFORM = Darwin ] ; then
+ export CMAKE_PREFIX_PATH=~/Qt/5.5/clang_64/lib/cmake
+fi
cmake -DCMAKE_BUILD_TYPE=Release -DQTONLY=TRUE -DQT5BUILD=ON \
-DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT \
-DBUILD_MARBLE_TESTS=NO \
@@ -151,6 +154,16 @@ cd src/lib/marble
make -j4
make install
+if [ $PLATFORM = Darwin ] ; then
+ # in order for macdeployqt to do its job correctly, we need the full path in the dylib ID
+ cd $INSTALL_ROOT/lib
+ NAME=$(otool -L libssrfmarblewidget.dylib | grep -v : | head -1 | cut -f1 -d\ | tr -d '\t' | cut -f3 -d/ )
+ echo $NAME | grep / > /dev/null 2>&1
+ if [ $? -eq 1 ] ; then
+ install_name_tool -id "$INSTALL_ROOT/lib/$NAME" "$INSTALL_ROOT/lib/$NAME"
+ fi
+fi
+
# build grantlee
cd $SRC
@@ -201,5 +214,5 @@ if [ $PLATFORM = Darwin ] ; then
rm -rf Subsurface.app
fi
-make -j4
-make install
+LIBRARY_PATH=$INSTALL_ROOT/lib make -j4
+LIBRARY_PATH=$INSTALL_ROOT/lib make install