virtualx-engine/platform/osx
Alexandru Croitor 3624644630 Pass -isysroot to compiler / linker when doing a macOS build
Previously the compiler would use system headers located at
/System/Library/Frameworks, which could result in compilation failures
due to the headers not always being up-to-date in regards to the
latest installed macOS SDK headers that come with Xcode.

Fix the issue by passing the SDK path via the -isysroot option to the
compiler and linker invocations.

If no custom SDK path is given, the build system queries the SDK path
via xcrun --show-sdk-path, which returns something similar to

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/
 /Developer/SDKs/MacOSX.sdk/

Querying via xcrun is now also done for iphone (and simulator)
platforms as well.

Here is an example of a compilation failure message due to outdated
headers:

platform/osx/os_osx.mm:1421:41: error: use of undeclared identifier 'NSAppKitVersionNumber10_12'; did you mean 'NSAppKitVersionNumber'?
                                if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_12) {
                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                    NSAppKitVersionNumber
/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:26:28: note: 'NSAppKitVersionNumber' declared here
2018-08-27 18:01:05 +02:00
..
export Make some debug prints verbose-only, remove others 2018-08-24 14:59:01 +02:00
crash_handler_osx.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
crash_handler_osx.mm Add a new notification to detect crashes on native scripts 2018-07-02 16:18:58 -03:00
detect.py Pass -isysroot to compiler / linker when doing a macOS build 2018-08-27 18:01:05 +02:00
dir_access_osx.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
dir_access_osx.mm Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
godot_main_osx.mm [macOS] Return exit code specified by OS.exit_code parameter. 2018-03-26 16:55:57 +03:00
joypad_osx.cpp Reduce unnecessary COW on Vector by make writing explicit 2018-07-26 00:54:16 +02:00
joypad_osx.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
logo.png Optimize images losslessly using oxipng -o6 --strip all --zopfli 2018-06-28 19:17:41 +02:00
os_osx.h Added a new MIDIDriver class 2018-07-21 09:09:42 -03:00
os_osx.mm Fall back to GLES2 if GLES3 is not working 2018-08-26 16:40:46 +02:00
platform_config.h add GLES 2 renderer for 2D 2018-03-01 15:12:30 +01:00
platform_osx_builders.py Running builder (content generator) functions in subprocesses on Windows 2018-07-27 21:37:55 +02:00
power_osx.cpp Update copyright statements to 2018 2018-01-01 14:40:47 +01:00
power_osx.h Update copyright statements to 2018 2018-01-01 14:40:47 +01:00
SCsub Running builder (content generator) functions in subprocesses on Windows 2018-07-27 21:37:55 +02:00
sem_osx.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
sem_osx.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00