Created
January 28, 2015 04:54
-
-
Save tsaiid/eb4168570ee9e2b69048 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ext/toolchain/commands1.py b/ext/toolchain/commands1.py | |
index d0b0960..4c7eba0 100644 | |
--- a/ext/toolchain/commands1.py | |
+++ b/ext/toolchain/commands1.py | |
@@ -451,16 +451,17 @@ class InternalCommands: | |
cmake_args += ' -DCMAKE_BUILD_TYPE=' + target.capitalize() | |
elif sys.platform == "darwin": | |
- macSdkMatch = re.match("(\d+)\.(\d+)", self.macSdk) | |
- if not macSdkMatch: | |
- raise Exception("unknown osx version: " + self.macSdk) | |
- | |
sdkDir = self.getMacSdkDir() | |
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_MINOR=" + macSdkMatch.group(2) | |
+ macSdkMatch = re.match("(\d+)\.(\d+)", self.macSdk) | |
+ if not macSdkMatch: | |
+ raise Exception("unknown osx version: " + self.macSdk) | |
+ | |
+ cmake_args += " -DOSX_TARGET_MAJOR=" + macSdkMatch.group(1) | |
+ cmake_args += " -DOSX_TARGET_MINOR=" + macSdkMatch.group(2) | |
+ | |
# if not visual studio, use parent dir | |
sourceDir = generator.getSourceDir() | |
@@ -485,10 +486,10 @@ class InternalCommands: | |
if generator.cmakeName.find('Eclipse') != -1: | |
self.fixCmakeEclipseBug() | |
- # only on osx 10.9 mavericks. | |
+ # only on osx 10.9 mavericks and 10.10 yosemite. | |
# manually change .xcodeproj to add code sign for | |
# synmacph project and specify its info.plist | |
- if self.macSdk == "10.9" and generator.cmakeName.find('Xcode') != -1: | |
+ if (self.macSdk == "10.9" or self.macSdk == "10.10") and generator.cmakeName.find('Xcode') != -1: | |
self.fixXcodeProject(target) | |
if err != 0: | |
@@ -577,7 +578,7 @@ class InternalCommands: | |
if os.path.exists(sdkPath): | |
return sdkPath | |
- return "/Developer/SDKs/" + sdkDirName + ".sdk" | |
+ return os.popen('xcodebuild -version -sdk macosx' + self.macSdk + ' Path').read().strip() | |
# http://tinyurl.com/cs2rxxb | |
def fixCmakeEclipseBug(self): | |
@@ -871,11 +872,12 @@ class InternalCommands: | |
raise Exception(bin + " failed with error: " + str(err)) | |
(qMajor, qMinor, qRev) = self.getQmakeVersion() | |
- if qMajor <= 4: | |
- frameworkRootDir = "/Library/Frameworks" | |
- else: | |
- # TODO: auto-detect, qt can now be installed anywhere. | |
- frameworkRootDir = "/Developer/Qt5.2.1/5.2.1/clang_64/lib" | |
+ #if qMajor <= 4: | |
+ # frameworkRootDir = "/Library/Frameworks" | |
+ #else: | |
+ # # TODO: auto-detect, qt can now be installed anywhere. | |
+ # frameworkRootDir = "/Developer/Qt5.2.1/5.2.1/clang_64/lib" | |
+ frameworkRootDir = "/usr/local/Cellar/qt/4.8.6/Frameworks" | |
target = dir + "/Synergy.app/Contents/Frameworks" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment