summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-11 23:40:54 +0100
committerwm4 <wm4@nowhere>2015-03-11 23:44:34 +0100
commitae6019cbc98cfad2613e89a80bee79ce6b2f1319 (patch)
treeae8be9cf1ce0f18a50d4e30a943cf7133c32dcae
parent8a4239e0c215a3fb039b34134f6aac70e2977169 (diff)
downloadmpv-ae6019cbc98cfad2613e89a80bee79ce6b2f1319.tar.bz2
mpv-ae6019cbc98cfad2613e89a80bee79ce6b2f1319.tar.xz
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.
-rw-r--r--wscript35
-rw-r--r--wscript_build.py4
2 files changed, 14 insertions, 25 deletions
diff --git a/wscript b/wscript
index 152e4c382b..c0d9b20fcd 100644
--- a/wscript
+++ b/wscript
@@ -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')),
}
]
@@ -528,22 +533,6 @@ video_output_features = [
'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',
'func': check_pkg_config('wayland-client', '>= 1.6.0',
@@ -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'),
}
]
diff --git a/wscript_build.py b/wscript_build.py
index 7c4c77d709..8c6ec0107a 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -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" ),