summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-04 01:42:51 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-04 01:45:55 +0900
commitacee6f4becfe4005535c40df927e01fad394eb23 (patch)
tree60293202ab2155b51d51d225722b5d801484199e /scripts
parent36d462e0f92b7e2be3c8c22e0cc10cc4e25acc9e (diff)
downloadsubsurface-acee6f4becfe4005535c40df927e01fad394eb23.tar.gz
build.sh: build against older SDK / minimum OSX version
On Mac we want to make sure that we don't only run on the OS that we were built on, but all the way back to 10.10 (that's the oldest that Qt supports). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
index 0cad87c6b..cf501c273 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -24,6 +24,8 @@ PLATFORM=$(uname)
# Verify that the Xcode Command Line Tools are installed
if [ $PLATFORM = Darwin ] ; then
+ OLDER_MAC="-mmacosx-version-min=10.10 -isysroot/Developer/SDKs/MacOSX10.10.sdk"
+ OLDER_MAC_CMAKE="-DCMAKE_OSX_DEPLOYMENT_TARGET=10.10 -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.10.sdk/"
if [ ! -d /usr/include ] ; then
echo "Error: Xcode Command Line Tools are not installed"
echo ""
@@ -106,7 +108,7 @@ if [[ $PLATFORM = Darwin || "$LIBGIT" < "24" ]] ; then
fi
mkdir -p build
cd build
- cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT -DCMAKE_BUILD_TYPE=Release -DBUILD_CLAR=OFF ..
+ cmake $OLDER_MAC_CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT -DCMAKE_BUILD_TYPE=Release -DBUILD_CLAR=OFF ..
make -j4
make install
@@ -149,7 +151,7 @@ if [ ! -f ../configure ] ; then
autoreconf --install ..
autoreconf --install ..
fi
-../configure --prefix=$INSTALL_ROOT --disable-examples
+CFLAGS="$OLDER_MAC -I$INSTALL_ROOT/include" ../configure --prefix=$INSTALL_ROOT --disable-examples
make -j4
make install
@@ -201,7 +203,7 @@ if [ $BUILDMARBLE = 1 ]; then
fi
fi
- cmake -DCMAKE_BUILD_TYPE=Release -DQTONLY=TRUE -DQT5BUILD=ON \
+ cmake $OLDER_MAC_CMAKE -DCMAKE_BUILD_TYPE=Release -DQTONLY=TRUE -DQT5BUILD=ON \
-DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT \
-DBUILD_MARBLE_TESTS=NO \
-DWITH_DESIGNER_PLUGIN=NO \
@@ -241,7 +243,7 @@ if [ "$BUILDGRANTLEE" = "1" ] ; then
fi
mkdir -p build
cd build
- cmake -DCMAKE_BUILD_TYPE=Release \
+ cmake $OLDER_MAC_CMAKE -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT \
-DBUILD__TESTS=NO \
$SRC/grantlee