1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 21:06:00 +00:00

build: simplify windows checks

There's no reason to do finegrained checks for libraries which always
must be present. It also reduces the number of extra dependencies.
This commit is contained in:
wm4 2015-03-11 23:40:54 +01:00
parent 8a4239e0c2
commit ae6019cbc9
2 changed files with 14 additions and 25 deletions

35
wscript
View File

@ -120,17 +120,22 @@ main_dependencies = [
'struct pollfd pfd; poll(&pfd, 1, 0); fork(); int f[2]; pipe(f); munmap(f,0)'),
}, {
'name': 'posix-or-mingw',
'desc': 'programming environment',
'desc': 'development environment',
'deps_any': [ 'posix', 'mingw' ],
'func': check_true,
'req': True,
'fmsg': 'Unable to find either POSIX or MinGW-w64 environment, ' \
'or compiler does not work.',
}, {
'name': 'win32',
'desc': 'win32',
'deps': [ 'os-win32' ],
'func': check_libs(['gdi32', 'winmm', 'ole32', 'uuid'], check_true),
}, {
'name': '--win32-internal-pthreads',
'desc': 'internal pthread wrapper for win32 (Vista+)',
'deps_neg': [ 'posix' ],
'deps': [ 'mingw' ],
'deps': [ 'win32' ],
'func': check_true,
'default': 'disable',
}, {
@ -517,8 +522,8 @@ audio_output_features = [
}, {
'name': '--wasapi',
'desc': 'WASAPI audio output',
'deps': ['atomics'],
'func': check_cc(fragment=load_fragment('wasapi.c'), lib='ole32'),
'deps': ['win32', 'atomics'],
'func': check_cc(fragment=load_fragment('wasapi.c')),
}
]
@ -527,22 +532,6 @@ video_output_features = [
'name': '--cocoa',
'desc': 'Cocoa',
'func': check_cocoa
} , {
'name': 'gdi',
'desc': 'GDI',
'func': check_cc(lib='gdi32')
} , {
'name': 'winmm',
'desc': 'WinMM',
'func': check_cc(lib='winmm')
} , {
'name': 'ole',
'desc': 'OLE',
'func': check_cc(lib='ole32')
} , {
'name': 'uuid',
'desc': 'UUID',
'func': check_cc(lib='uuid')
} , {
'name': '--wayland',
'desc': 'Wayland',
@ -609,7 +598,7 @@ video_output_features = [
} , {
'name': '--gl-win32',
'desc': 'OpenGL Win32 Backend',
'deps': [ 'gdi', 'winmm', 'ole', 'uuid' ],
'deps': [ 'win32' ],
'groups': [ 'gl' ],
'func': check_statement('windows.h', 'wglCreateContext(0)',
lib='opengl32')
@ -656,7 +645,7 @@ video_output_features = [
}, {
'name': '--direct3d',
'desc': 'Direct3D support',
'deps': [ 'gdi', 'winmm', 'ole', 'uuid' ],
'deps': [ 'win32' ],
'func': check_cc(header_name='d3d9.h'),
}
]
@ -691,7 +680,7 @@ hwaccel_features = [
}, {
'name': '--dxva2-hwaccel',
'desc': 'libavcodec DXVA2 hwaccel',
'deps': [ 'gdi' ],
'deps': [ 'win32' ],
'func': check_headers('libavcodec/dxva2.h', use='libav'),
}
]

View File

@ -336,7 +336,7 @@ def build(ctx):
( "video/out/gl_hwdec_vdpau.c", "vdpau-gl-x11" ),
( "video/out/gl_lcms.c", "gl" ),
( "video/out/gl_osd.c", "gl" ),
( "video/out/gl_utils.c", "gl" ),
( "video/out/gl_utils.c", "gl" ),
( "video/out/gl_video.c", "gl" ),
( "video/out/gl_w32.c", "gl-win32" ),
( "video/out/gl_wayland.c", "gl-wayland" ),
@ -356,7 +356,7 @@ def build(ctx):
( "video/out/vo_wayland.c", "wayland" ),
( "video/out/vo_x11.c" , "x11" ),
( "video/out/vo_xv.c", "xv" ),
( "video/out/w32_common.c", "gdi" ),
( "video/out/w32_common.c", "win32" ),
( "video/out/wayland_common.c", "wayland" ),
( "video/out/wayland/buffer.c", "wayland" ),
( "video/out/wayland/memfile.c", "wayland" ),