Skip to content

Commit

Permalink
build: simplify windows checks
Browse files Browse the repository at this point in the history
There's no reason to do finegrained checks for libraries which always
must be present. It also reduces the number of extra dependencies.
  • Loading branch information
wm4 committed Mar 11, 2015
1 parent 8a4239e commit ae6019c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 25 deletions.
35 changes: 12 additions & 23 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}, {
Expand Down Expand Up @@ -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')),
}
]

Expand All @@ -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',
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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'),
}
]
Expand Down Expand Up @@ -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'),
}
]
Expand Down
4 changes: 2 additions & 2 deletions wscript_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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" ),
Expand All @@ -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" ),
Expand Down

0 comments on commit ae6019c

Please sign in to comment.