mirror of
https://github.com/debauchee/barrier.git
synced 2024-11-23 00:56:21 +03:00
#3797 Fix "Unix Makefile" build on macOS
This commit is contained in:
parent
2b9f48602c
commit
d1396c9767
@ -430,14 +430,16 @@ class InternalCommands:
|
|||||||
if generator.cmakeName.find('Unix Makefiles') != -1:
|
if generator.cmakeName.find('Unix Makefiles') != -1:
|
||||||
cmake_args += ' -DCMAKE_BUILD_TYPE=' + target.capitalize()
|
cmake_args += ' -DCMAKE_BUILD_TYPE=' + target.capitalize()
|
||||||
|
|
||||||
elif sys.platform == "darwin":
|
if sys.platform == "darwin":
|
||||||
macSdkMatch = re.match("(\d+)\.(\d+)", self.macSdk)
|
macSdkMatch = re.match("(\d+)\.(\d+)", self.macSdk)
|
||||||
if not macSdkMatch:
|
if not macSdkMatch:
|
||||||
raise Exception("unknown osx version: " + self.macSdk)
|
raise Exception("unknown osx version: " + self.macSdk)
|
||||||
|
|
||||||
sdkDir = self.getMacSdkDir()
|
if generator.cmakeName.find('Unix Makefiles') == -1:
|
||||||
cmake_args += " -DCMAKE_OSX_SYSROOT=" + sdkDir
|
sdkDir = self.getMacSdkDir()
|
||||||
cmake_args += " -DCMAKE_OSX_DEPLOYMENT_TARGET=" + self.macSdk
|
cmake_args += " -DCMAKE_OSX_SYSROOT=" + sdkDir
|
||||||
|
cmake_args += " -DCMAKE_OSX_DEPLOYMENT_TARGET=" + self.macSdk
|
||||||
|
|
||||||
cmake_args += " -DOSX_TARGET_MAJOR=" + macSdkMatch.group(1)
|
cmake_args += " -DOSX_TARGET_MAJOR=" + macSdkMatch.group(1)
|
||||||
cmake_args += " -DOSX_TARGET_MINOR=" + macSdkMatch.group(2)
|
cmake_args += " -DOSX_TARGET_MINOR=" + macSdkMatch.group(2)
|
||||||
|
|
||||||
@ -551,7 +553,7 @@ class InternalCommands:
|
|||||||
if os.path.exists(sdkPath):
|
if os.path.exists(sdkPath):
|
||||||
return sdkPath
|
return sdkPath
|
||||||
|
|
||||||
return "/Developer/SDKs/" + sdkDirName + ".sdk"
|
return os.popen('xcodebuild -version -sdk macosx' + self.macSdk + ' Path').read().strip()
|
||||||
|
|
||||||
# http://tinyurl.com/cs2rxxb
|
# http://tinyurl.com/cs2rxxb
|
||||||
def fixCmakeEclipseBug(self):
|
def fixCmakeEclipseBug(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user