aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@theqtcompany.com>2016-05-20 10:25:56 +0200
committerChristian Tismer <tismer@stackless.com>2016-05-20 09:14:00 +0000
commit9f6eae5c6506bd1d61f6ca896c2d72fc5bc99bd1 (patch)
tree6374f74a7ec41c142620e2790794f987a43a2cc4 /setup.py
parent5d74375896f85b0439c5d9e1552bbf13d06b3cba (diff)
Allow explicitly setting the OSX sysroot / SDK.
The change allows using the provided SDK in all compilation targets. Change-Id: I2b5d7b24af725e82c5468b9a5e22cc60fd0e42c4 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 236d9f1e8..a025c093a 100644
--- a/setup.py
+++ b/setup.py
@@ -24,6 +24,9 @@ REQUIREMENTS:
OPTIONAL:
OpenSSL: You can specify the location of OpenSSL DLLs with option --opnessl=</path/to/openssl/bin>.
You can download OpenSSL for windows here: http://slproweb.com/products/Win32OpenSSL.html
+
+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/".
"""
__version__ = "2.0.0.dev0"
@@ -161,6 +164,7 @@ OPTION_JOM = has_option('jom') # use jom instead of nmake wit
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_XVFB = has_option("use-xvfb")
if OPTION_QT_VERSION is None:
@@ -644,6 +648,9 @@ class pyside_build(_build):
# implicitly, thus the option is a no-op in those cases.
cmake_cmd.append("-DOSX_USE_LIBCPP=ON")
+ if OPTION_OSX_SYSROOT:
+ cmake_cmd.append("-DCMAKE_OSX_SYSROOT={}".format(OPTION_OSX_SYSROOT))
+
log.info("Configuring module %s (%s)..." % (extension, module_src_dir))
if run_process(cmake_cmd) != 0:
raise DistutilsSetupError("Error configuring " + extension)