diff --git a/.gitignore b/.gitignore index 83ae6d2a..c7a96266 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ /src/gui/tmp /src/gui/ui_* src/gui/gui.pro.user +src/gui/.qmake.stash +config.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 5704eebe..97d9eae2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -161,19 +161,19 @@ if (UNIX) endif() if (APPLE) - exec_program(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION) - string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION}) - message(STATUS "DARWIN_VERSION=${DARWIN_VERSION}") - if (DARWIN_VERSION LESS 9) - # 10.4: Universal (32-bit Intel and PowerPC) + message(STATUS "OSX_TARGET_MAJOR=${OSX_TARGET_MAJOR}") + message(STATUS "OSX_TARGET_MINOR=${OSX_TARGET_MINOR}") + + if (NOT (OSX_TARGET_MAJOR EQUAL 10)) + message(FATAL_ERROR "Mac OS X target must be 10.x") + endif () + + if (OSX_TARGET_MINOR LESS 6) + # <= 10.5: 32-bit Intel and PowerPC set(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "" FORCE) - else (DARWIN_VERSION LESS 10) - # 10.5: 32-bit Intel only - set(CMAKE_OSX_ARCHITECTURES "i386" - CACHE STRING "" FORCE) else() - # 10.6+: Intel only + # >= 10.6: Intel only set(CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE STRING "" FORCE) endif() diff --git a/ext/toolchain/commands1.py b/ext/toolchain/commands1.py index 5374bcd2..96484505 100644 --- a/ext/toolchain/commands1.py +++ b/ext/toolchain/commands1.py @@ -451,9 +451,15 @@ 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) # if not visual studio, use parent dir sourceDir = generator.getSourceDir() diff --git a/src/cmd/CMakeLists.txt b/src/cmd/CMakeLists.txt index 7cf8bf61..5e902ebf 100644 --- a/src/cmd/CMakeLists.txt +++ b/src/cmd/CMakeLists.txt @@ -25,7 +25,7 @@ if (WIN32) endif() if (APPLE) - if (DARWIN_VERSION GREATER 12) + if (OSX_TARGET_MINOR GREATER 8) add_subdirectory(synmacph) endif() endif() diff --git a/src/gui/res/mac/Info.plist b/src/gui/res/mac/Info.plist index 5635d68c..992df616 100644 --- a/src/gui/res/mac/Info.plist +++ b/src/gui/res/mac/Info.plist @@ -1,7 +1,11 @@ - - + + + CFBundleInfoDictionaryVersion + 6.0 + NSPrincipalClass + NSApplication CFBundleIconFile Synergy.icns CFBundlePackageType