Fix wxOSX build with Xcode 10 and later

Update target architectures to support building with the whole range of
supported Xcode versions by not targeting i386 by default, as well as
adding an arm64 target. Targeting i386 results in a deprecation
error starting with Xcode 10:

error: The i386 architecture is deprecated. You should update your ARCHS
build setting to remove the i386 architecture.
This commit is contained in:
Dimitri Schoolwerth 2021-08-20 22:51:00 +02:00
parent e29e48a77b
commit 0b9176874e
2 changed files with 13 additions and 1 deletions

View File

@ -4,9 +4,17 @@ WXTOOLKITUPPER = COCOA
#include "wx.xcconfig" #include "wx.xcconfig"
MACOSX_DEPLOYMENT_TARGET = 10.10 MACOSX_DEPLOYMENT_TARGET = 10.10
MACOSX_DEPLOYMENT_TARGET[arch=arm64] = 11.0
GCC_VERSION = GCC_VERSION =
ARCHS = i386 x86_64 // Set ARCHS explicitly for when Xcode stops targeting x86_64 by default.
// Unknown targets are ignored by Xcode (arm64 requires Xcode 12 or later).
ARCHS = x86_64 arm64
// Using i386 as a target results in a deprecation error since Xcode 10 (first
// a warning in 9). If Xcode 9 or earlier is used and the i386 target is also
// needed, one solution is to enable the following line locally.
//ARCHS = i386 x86_64
OTHER_LDFLAGS = -framework WebKit -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework OpenGL -framework AVFoundation -framework CoreMedia -framework Security -framework QuartzCore -weak_framework AVKit OTHER_LDFLAGS = -framework WebKit -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework OpenGL -framework AVFoundation -framework CoreMedia -framework Security -framework QuartzCore -weak_framework AVKit

View File

@ -182,6 +182,10 @@ Changes in behaviour which may result in build errors
- Under macOS, 10.11 SDK is the minimum SDK, building and deploying under 10.10.5 and - Under macOS, 10.11 SDK is the minimum SDK, building and deploying under 10.10.5 and
higher is supported, you must use at least Xcode 7.2.1. higher is supported, you must use at least Xcode 7.2.1.
- wxOSX Xcode projects no longer include the i386 target by default and,
with Xcode 12 or later, build for the arm64 architecture in addition to
existing x86_64. See build/osx/wxcocoa.xcconfig for more information.
- wxPGProperty ctors are not longer public since this class is intended to be - wxPGProperty ctors are not longer public since this class is intended to be
a base class and should not be instantiated directly. a base class and should not be instantiated directly.