Skip to content

Commit

Permalink
meson: skip subprocess-posix on iOS and tvOS
Browse files Browse the repository at this point in the history
  • Loading branch information
sixones committed Jan 25, 2024
1 parent 818ce7c commit a59d120
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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 <TargetConditionals.h>') == '1'
is_tvos = cc.get_define('TARGET_OS_TV',
prefix: '#include <TargetConditionals.h>') == '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}
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit a59d120

Please sign in to comment.