Merge branch 'petroules-mac-fixes'
This commit is contained in:
commit
39b534f3b8
|
@ -10,3 +10,5 @@
|
|||
/src/gui/tmp
|
||||
/src/gui/ui_*
|
||||
src/gui/gui.pro.user
|
||||
src/gui/.qmake.stash
|
||||
config.h
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Synergy.icns</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
|
|
Loading…
Reference in New Issue