mirror of https://github.com/mpv-player/mpv
meson: streamline selection of certain osdep sources
This commit is contained in:
parent
66c3110a85
commit
af53ce18bd
23
meson.build
23
meson.build
|
@ -399,8 +399,7 @@ endif
|
|||
if posix
|
||||
path_source = files('osdep/path-unix.c')
|
||||
subprocess_source = files('osdep/subprocess-posix.c')
|
||||
sources += path_source + subprocess_source + \
|
||||
files('input/ipc-unix.c',
|
||||
sources += files('input/ipc-unix.c',
|
||||
'osdep/poll_wrapper.c',
|
||||
'osdep/terminal-unix.c',
|
||||
'sub/filter_regex.c')
|
||||
|
@ -413,13 +412,11 @@ endif
|
|||
|
||||
if darwin
|
||||
path_source = files('osdep/path-darwin.c')
|
||||
sources += path_source + files('osdep/timer-darwin.c')
|
||||
|
||||
timer_source = files('osdep/timer-darwin.c')
|
||||
endif
|
||||
|
||||
if posix and not darwin
|
||||
sources += files('osdep/path-unix.c',
|
||||
'osdep/timer-linux.c')
|
||||
timer_source = files('osdep/timer-linux.c')
|
||||
endif
|
||||
|
||||
features += {'ppoll': cc.has_function('ppoll', args: '-D_GNU_SOURCE',
|
||||
|
@ -471,13 +468,14 @@ uwp = cc.find_library('windowsapp', required: uwp_opt)
|
|||
features += {'uwp': uwp.found()}
|
||||
if features['uwp']
|
||||
dependencies += uwp
|
||||
sources += files('osdep/path-uwp.c')
|
||||
path_source = files('osdep/path-uwp.c')
|
||||
subprocess_source = []
|
||||
endif
|
||||
|
||||
features += {'win32-executable': win32 and get_option('cplayer')}
|
||||
if win32
|
||||
sources += files('osdep/timer-win2.c',
|
||||
'osdep/w32_keyboard.c',
|
||||
timer_source = files('osdep/timer-win2.c')
|
||||
sources += files('osdep/w32_keyboard.c',
|
||||
'osdep/windows_utils.c')
|
||||
endif
|
||||
|
||||
|
@ -494,8 +492,7 @@ if features['win32-desktop']
|
|||
dependencies += win32_desktop_libs
|
||||
path_source = files('osdep/path-win.c')
|
||||
subprocess_source = files('osdep/subprocess-win.c')
|
||||
sources += path_source + subprocess_source + \
|
||||
files('input/ipc-win.c',
|
||||
sources += files('input/ipc-win.c',
|
||||
'osdep/language-win.c',
|
||||
'osdep/main-fn-win.c',
|
||||
'osdep/terminal-win.c',
|
||||
|
@ -506,7 +503,7 @@ endif
|
|||
|
||||
if not posix and not features['win32-desktop']
|
||||
subprocess_source = files('osdep/subprocess-dummy.c')
|
||||
sources += subprocess_source + files('input/ipc-dummy.c')
|
||||
sources += files('input/ipc-dummy.c')
|
||||
endif
|
||||
|
||||
features += {'glob-posix': cc.has_function('glob', prefix: '#include <glob.h>')}
|
||||
|
@ -551,6 +548,8 @@ vector = get_option('vector').require(
|
|||
)
|
||||
features += {'vector': vector.allowed()}
|
||||
|
||||
sources += path_source + subprocess_source + timer_source
|
||||
|
||||
|
||||
# various file generations
|
||||
tools_directory = join_paths(source_root, 'TOOLS')
|
||||
|
|
Loading…
Reference in New Issue