aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-02-02 16:11:05 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2018-02-06 10:48:04 +0000
commit63fefd446910a921de7ebc350b9d62caecf0e730 (patch)
tree06a1011c22037c13f9a22dc3aa902f8d1fa282a0
parent6d04376b9993f06700df92a8d03d09b3e75f4408 (diff)
Add setup.py option to set the OS X minimum deployment target
This is necessary to create binaries that will run on systems older than the system on which the binaries are build. Task-number: PYSIDE-603 Change-Id: Iab1e155d63f0a0cde5de7bbf54ca2c906d8bf188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--setup.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 5855d6f8f..83d179e45 100644
--- a/setup.py
+++ b/setup.py
@@ -106,6 +106,18 @@ OpenSSL:
OS X SDK: You can specify which OS X SDK should be used for compilation with the option --osx-sysroot=</path/to/sdk>.
For e.g. "--osx-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/".
+
+OS X Minimum deployment target:
+ You can specify the OS X minimum deployment target with the --osx-deployment-target=<x> option.
+ For example "--osx-deployment-target=10.10".
+
+ OS X provides the ability to set what is the minimum OS version on which a binary will run. This
+ means that a build can be done on the latest OS X version with latest XCode and SDK versions,
+ but the built application / library can run on older OS versions.
+
+ Note: if the option is not set, CMake will try to query the MACOSX_DEPLOYMENT_TARGET environment
+ variable, and if that is empty, it will try to deduce a value internally (afaik based on
+ current OS X version and on the chosen SDK version).
"""
__version__ = "5.6"
@@ -265,6 +277,7 @@ OPTION_BUILDTESTS = has_option("build-tests")
OPTION_OSXARCH = option_value("osx-arch")
OPTION_OSX_USE_LIBCPP = has_option("osx-use-libc++")
OPTION_OSX_SYSROOT = option_value("osx-sysroot")
+OPTION_OSX_DEPLOYMENT_TARGET = option_value("osx-deployment-target")
OPTION_XVFB = has_option("use-xvfb")
OPTION_REUSE_BUILD = has_option("reuse-build")
OPTION_SKIP_CMAKE = has_option("skip-cmake")
@@ -964,6 +977,9 @@ class pyside_build(_build):
latest_sdk_path = latest_sdk_path[0]
cmake_cmd.append("-DCMAKE_OSX_SYSROOT={0}".format(latest_sdk_path))
+ if OPTION_OSX_DEPLOYMENT_TARGET:
+ cmake_cmd.append("-DCMAKE_OSX_DEPLOYMENT_TARGET={0}"
+ .format(OPTION_OSX_DEPLOYMENT_TARGET))
if not OPTION_SKIP_CMAKE:
log.info("Configuring module %s (%s)..." % (extension, module_src_dir))