1
0
mirror of https://github.com/mpv-player/mpv synced 2025-04-11 04:01:31 +00:00

meson: streamline selection of certain osdep sources

This commit is contained in:
sfan5 2023-10-18 15:19:56 +02:00
parent 66c3110a85
commit af53ce18bd

View File

@ -399,8 +399,7 @@ endif
if posix if posix
path_source = files('osdep/path-unix.c') path_source = files('osdep/path-unix.c')
subprocess_source = files('osdep/subprocess-posix.c') subprocess_source = files('osdep/subprocess-posix.c')
sources += path_source + subprocess_source + \ sources += files('input/ipc-unix.c',
files('input/ipc-unix.c',
'osdep/poll_wrapper.c', 'osdep/poll_wrapper.c',
'osdep/terminal-unix.c', 'osdep/terminal-unix.c',
'sub/filter_regex.c') 'sub/filter_regex.c')
@ -413,13 +412,11 @@ endif
if darwin if darwin
path_source = files('osdep/path-darwin.c') path_source = files('osdep/path-darwin.c')
sources += path_source + files('osdep/timer-darwin.c') timer_source = files('osdep/timer-darwin.c')
endif endif
if posix and not darwin if posix and not darwin
sources += files('osdep/path-unix.c', timer_source = files('osdep/timer-linux.c')
'osdep/timer-linux.c')
endif endif
features += {'ppoll': cc.has_function('ppoll', args: '-D_GNU_SOURCE', 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()} features += {'uwp': uwp.found()}
if features['uwp'] if features['uwp']
dependencies += uwp dependencies += uwp
sources += files('osdep/path-uwp.c') path_source = files('osdep/path-uwp.c')
subprocess_source = []
endif endif
features += {'win32-executable': win32 and get_option('cplayer')} features += {'win32-executable': win32 and get_option('cplayer')}
if win32 if win32
sources += files('osdep/timer-win2.c', timer_source = files('osdep/timer-win2.c')
'osdep/w32_keyboard.c', sources += files('osdep/w32_keyboard.c',
'osdep/windows_utils.c') 'osdep/windows_utils.c')
endif endif
@ -494,8 +492,7 @@ if features['win32-desktop']
dependencies += win32_desktop_libs dependencies += win32_desktop_libs
path_source = files('osdep/path-win.c') path_source = files('osdep/path-win.c')
subprocess_source = files('osdep/subprocess-win.c') subprocess_source = files('osdep/subprocess-win.c')
sources += path_source + subprocess_source + \ sources += files('input/ipc-win.c',
files('input/ipc-win.c',
'osdep/language-win.c', 'osdep/language-win.c',
'osdep/main-fn-win.c', 'osdep/main-fn-win.c',
'osdep/terminal-win.c', 'osdep/terminal-win.c',
@ -506,7 +503,7 @@ endif
if not posix and not features['win32-desktop'] if not posix and not features['win32-desktop']
subprocess_source = files('osdep/subprocess-dummy.c') subprocess_source = files('osdep/subprocess-dummy.c')
sources += subprocess_source + files('input/ipc-dummy.c') sources += files('input/ipc-dummy.c')
endif endif
features += {'glob-posix': cc.has_function('glob', prefix: '#include <glob.h>')} features += {'glob-posix': cc.has_function('glob', prefix: '#include <glob.h>')}
@ -551,6 +548,8 @@ vector = get_option('vector').require(
) )
features += {'vector': vector.allowed()} features += {'vector': vector.allowed()}
sources += path_source + subprocess_source + timer_source
# various file generations # various file generations
tools_directory = join_paths(source_root, 'TOOLS') tools_directory = join_paths(source_root, 'TOOLS')