meson: Don't require cross files to set host_system = ios
It's not specified as a host_system by meson, so people will often not set it.
This commit is contained in:
parent
8366ff0ce0
commit
9a362bd149
11
meson.build
11
meson.build
@ -34,6 +34,17 @@ cpp = meson.get_compiler('cpp')
|
|||||||
|
|
||||||
host_system = host_machine.system()
|
host_system = host_machine.system()
|
||||||
|
|
||||||
|
# Don't rely on the cross file setting the system properly when targeting ios
|
||||||
|
if host_system == 'darwin' and meson.is_cross_build()
|
||||||
|
ios_test_code = '''#include <TargetConditionals.h>
|
||||||
|
#if ! TARGET_OS_IPHONE
|
||||||
|
#error "Not iOS/tvOS/watchOS/iPhoneSimulator"
|
||||||
|
#endif'''
|
||||||
|
if cc.compiles(ios_test_code, name : 'building for iOS')
|
||||||
|
host_system = 'ios'
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
platform_cflags = []
|
platform_cflags = []
|
||||||
os_cflags = []
|
os_cflags = []
|
||||||
os_deps = []
|
os_deps = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user