mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-28 14:29:25 +08:00
meson: properly add path-mac.c to path_source and don't overwrite it
path-mac.c was not properly set as path_source for macOS. it didn't lead
to any errors because it was added to the normal source files. though
in the case of tests and for certain setups the mac path symbols were
not found.
to fix that properly add path-mac.c to path_source (additional to
path_darwin.c), remove it from the normal source files and don't
overwrite it later with the posix or darwin path.
this was overlooked in 9db8182 and #11374
This commit is contained in:
committed by
Kacper Michajłow
parent
065af28bc2
commit
b4151d4449
+7
-7
@@ -406,13 +406,18 @@ add_project_link_arguments(link_flags, language: ['c', 'cpp', 'objc'])
|
||||
|
||||
|
||||
# osdep
|
||||
if darwin
|
||||
path_source = files('osdep/path-darwin.c')
|
||||
timer_source = files('osdep/timer-darwin.c')
|
||||
endif
|
||||
|
||||
cocoa = dependency('appleframeworks', modules: ['Cocoa', 'IOKit', 'QuartzCore'],
|
||||
required: get_option('cocoa'))
|
||||
features += {'cocoa': cocoa.found()}
|
||||
if features['cocoa']
|
||||
dependencies += cocoa
|
||||
path_source += files('osdep/path-mac.m')
|
||||
sources += files('osdep/language-mac.c',
|
||||
'osdep/path-mac.m',
|
||||
'osdep/utils-mac.c',
|
||||
'osdep/mac/app_bridge.m',
|
||||
'player/clipboard/clipboard-mac.m')
|
||||
@@ -420,7 +425,6 @@ if features['cocoa']
|
||||
endif
|
||||
|
||||
if posix
|
||||
path_source = files('osdep/path-unix.c')
|
||||
if not get_option('fuzzers') and cc.has_function('fork', prefix : '#include <unistd.h>')
|
||||
sources += files('osdep/subprocess-posix.c')
|
||||
else
|
||||
@@ -437,12 +441,8 @@ if posix and not features['cocoa']
|
||||
main_fn_source = files('osdep/main-fn-unix.c')
|
||||
endif
|
||||
|
||||
if darwin
|
||||
path_source = files('osdep/path-darwin.c')
|
||||
timer_source = files('osdep/timer-darwin.c')
|
||||
endif
|
||||
|
||||
if posix and not darwin
|
||||
path_source = files('osdep/path-unix.c')
|
||||
timer_source = files('osdep/timer-linux.c')
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user