mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
meson: Autodetect when building for iOS
Instead of relying on `system` to be set correctly in the cross-compile file, detect when we're building for iOS/watchOS/tvOS.
This commit is contained in:
parent
c6af3c7749
commit
3c78d0cec6
10
meson.build
10
meson.build
@ -33,6 +33,16 @@ endif
|
||||
|
||||
host_system = host_machine.system()
|
||||
|
||||
if host_system == 'darwin'
|
||||
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
|
||||
|
||||
glib_version = meson.project_version()
|
||||
glib_api_version = '2.0'
|
||||
version_arr = glib_version.split('.')
|
||||
|
Loading…
Reference in New Issue
Block a user