aboutsummaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-07-06 16:42:30 +0000
committerGuy Harris <guy@alum.mit.edu>2013-07-06 16:42:30 +0000
commit519c5affa2f9713a9f196c78ebf44b2308ff4ef1 (patch)
treeb8643ffb40aaba4a4ddc1b55630b3ce2581c6e45 /packaging
parent5a744f4afa70c75cc06bbeff5825657876d9c6f2 (diff)
Add a --enable-osx-deploy-target option to set the deployment target
when building for OS X; that causes the MACOSX_DEPLOYMENT_TARGET environment variable to be set when building (so that, for example, we don't use linker features available on the version on which we're building but not on the minimum OS version for which we're building), and causes the SDK for that version to be used (so that, for example, we don't link with libraries with later version numbers than the ones provided with the OS version for which we're building). svn path=/trunk/; revision=50410
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/macosx/osx-app.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/packaging/macosx/osx-app.sh b/packaging/macosx/osx-app.sh
index 8227f2a1a1..e3bcd69a37 100755
--- a/packaging/macosx/osx-app.sh
+++ b/packaging/macosx/osx-app.sh
@@ -91,9 +91,11 @@ OPTIONS
specify the path to Info.plist. Info.plist can be found
in the base directory of the source code once configure
has been run.
+ -sdkroot
+ specify the root of the SDK to use
EXAMPLE
- $0 -s -l /opt/local -bp ../../Build/bin -p Info.plist
+ $0 -s -l /opt/local -bp ../../Build/bin -p Info.plist -sdkroot /Developer/SDKs/MacOSX10.5.sdk
"
}
@@ -117,6 +119,9 @@ do
-h|--help)
help
exit 0 ;;
+ -sdkroot)
+ sdkroot="$2"
+ shift 1 ;;
*)
echo "Invalid command line option: $1"
exit 2 ;;
@@ -160,6 +165,13 @@ else
EXTRALIBS=""
fi
+# Set the SDK root, if an SDK was specified.
+# (-sdk is only supported by the xcodebuild in the version of the
+# developer tools that came with Snow Leopard and later versions)
+if [ ! -z "$sdkroot" ]
+then
+ XCODEFLAGS="$XCODEFLAGS SDKROOT=$sdkroot"
+fi
# Package always has the same name. Version information is stored in
# the Info.plist file which is filled in by the configure script.