From a59d120cb510d8f31c62fa8ad73b080d08073707 Mon Sep 17 00:00:00 2001 From: Adam Livesley Date: Thu, 25 Jan 2024 13:38:27 +0000 Subject: [PATCH] meson: skip subprocess-posix on iOS and tvOS --- meson.build | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/meson.build b/meson.build index fdfc526525b89..f17ffbbd3ac52 100644 --- a/meson.build +++ b/meson.build @@ -300,6 +300,21 @@ darwin = host_machine.system() == 'darwin' win32 = host_machine.system() == 'cygwin' or host_machine.system() == 'windows' posix = not win32 +# Narrow down the darwin systems to iOS, tvOS or macOS +if host_machine.system() == 'darwin' + is_ios = cc.get_define('TARGET_OS_IPHONE', + prefix: '#include ') == '1' + is_tvos = cc.get_define('TARGET_OS_TV', + prefix: '#include ') == '1' + + # Assume it's macOS if it's neither iOS or tvOS + is_macos = not is_ios and not is_tvos +else + is_ios = false + is_tvos = false + is_macos = false +endif + features += {'darwin': darwin} features += {'posix': posix} features += {'dos-paths': win32, 'win32': win32} @@ -400,6 +415,10 @@ if posix 'sub/filter_regex.c') endif +if is_ios or is_tvos + subprocess_source = [ ] +endif + if posix and not features['cocoa'] sources += files('osdep/main-fn-unix.c', 'osdep/language-posix.c')