-
Notifications
You must be signed in to change notification settings - Fork 40
Compiling projects on macOS with modern Xcode versions
Apple likes deprecating APIs and architectures. Given that Garry's Mod is stuck on 32 bits and Mac OS X 10.7 SDK for now, it makes our lives harder to compile modules for it. However, there is a way to to it on modern Xcode versions (confirmed on Xcode 10) without much hassle.
You need:
- A copy of the Mac OS X 10.7 SDK (there are a multitude of SDK versions here)
- Xcode (and its terminal tools installed)
After extracting the SDK, copy its resulting directory to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
(or whatever directory is outputted by xcrun --sdk macosx --show-sdk-platform-path
, followed by /Developer/SDKs
).
Modify the Info.plist
file inside the Mac OS X platform directory (/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
or xcrun --sdk macosx --show-sdk-platform-path
) such that the key MinimumSDKVersion
contains the value 10.7
instead.
And that's it. garrysmod_common
will do the rest and try to automatically use this SDK.