Changeset 5656509 in subsurface


Ignore:
Timestamp:
Jul 15, 2017, 10:39:44 AM (2 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
d943a843
Parents:
7f49ba7
git-author:
Dirk Hohndel <dirk@…> (07/15/17 10:37:50)
git-committer:
Dirk Hohndel <dirk@…> (07/15/17 10:39:44)
Message:

Mac build: deal with SDK location and availability

I really want to build against 10.10 so as many people as
possible can use the binaries I create, but regular users
might not have the older SDKs installed.

Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/build.sh

    rbd18b6b r5656509  
    4141# Verify that the Xcode Command Line Tools are installed
    4242if [ $PLATFORM = Darwin ] ; then
    43         OLDER_MAC="-mmacosx-version-min=10.10 -isysroot/Developer/SDKs/MacOSX10.10.sdk"
    44         OLDER_MAC_CMAKE="-DCMAKE_OSX_DEPLOYMENT_TARGET=10.10 -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.10.sdk/"
     43        if [ -d /Developer/SDKs ] ; then
     44                SDKROOT=/Developer/SDKs
     45        elif [ -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs ] ; then
     46                SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
     47        else
     48                echo "Cannot find SDK sysroot (usually /Developer/SDKs or"
     49                echo "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs)"
     50                exit 1;
     51        fi
     52        BASESDK=$(ls $SDKROOT | grep "MacOSX10\.1.\.sdk" | head -1 | sed -e "s/MacOSX//;s/\.sdk//")
     53        OLDER_MAC="-mmacosx-version-min=${BASESDK} -isysroot${SDKROOT}/MacOSX${BASESDK}.sdk"
     54        OLDER_MAC_CMAKE="-DCMAKE_OSX_DEPLOYMENT_TARGET=${BASESDK} -DCMAKE_OSX_SYSROOT=${SDKROOT}/MacOSX${BASESDK}.sdk/"
    4555        if [ ! -d /usr/include ] ; then
    4656                echo "Error: Xcode Command Line Tools are not installed"
Note: See TracChangeset for help on using the changeset viewer.