From a2fb6b15a9542e2e6bfeaf3104f0c9e2dd77d00d Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 28 Apr 2017 15:42:43 +0200 Subject: Fix CMake bug where incorrect CMAKE_OSX_SYSROOT was chosen Apparently in earlier versions of CMake, if the OS version found in CMAKE_OSX_DEPLOYMENT_TARGET did not have a corresponding SDK with the same version in XCode, the CMake build would fail. Make sure to use the latest SDK available to XCode. Change-Id: Ie2317c1d285377b0cd5c7a75c94628b03aef557e Reviewed-by: Qt CI Bot Reviewed-by: Christian Tismer --- setup.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup.py b/setup.py index 885ab9865..da11ad0ca 100644 --- a/setup.py +++ b/setup.py @@ -825,6 +825,12 @@ class pyside_build(_build): if OPTION_OSX_SYSROOT: cmake_cmd.append("-DCMAKE_OSX_SYSROOT={}".format(OPTION_OSX_SYSROOT)) + else: + latest_sdk_path = run_process_output(['xcrun', '--show-sdk-path']) + if latest_sdk_path: + latest_sdk_path = latest_sdk_path[0] + cmake_cmd.append("-DCMAKE_OSX_SYSROOT={}".format(latest_sdk_path)) + if not OPTION_SKIP_CMAKE: log.info("Configuring module %s (%s)..." % (extension, module_src_dir)) -- cgit v1.2.3