[constants]
# apple silicon only supports macOS >=11.x, so just use that
macos_min = '11.1'
cflags = ['-mmacosx-version-min='+macos_min, '-arch', 'arm64', '-mcpu=apple-a14']
ldflags = cflags

[host_machine]
cpu_family = 'aarch64'
cpu = 'apple-a14'
system = 'darwin'
endian = 'little'

[binaries]
c = 'clang'
cpp = 'clang++'
objc = 'clang'
strip = 'strip'
pkgconfig = 'pkg-config'

[properties]
needs_exe_wrapper = true

[project options]
install_macos_bundle = 'enabled'

[built-in options]
c_args = cflags
c_link_args = ldflags
cpp_args = cflags
cpp_link_args = ldflags
# necessary for -mmacosx-version-min to take effect on objc headers when building for macOS
objc_args = cflags
objc_link_args = ldflags

[sdl2:project options]
# neither are necessary for macOS, but SDL2 will compile against them if present on the system (homebrew)
use_audio_pulseaudio = 'disabled'
use_video_x11 = 'disabled'
