summaryrefslogtreecommitdiffstats
path: root/waftools
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-07 21:33:14 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-01-25 17:00:18 +0900
commitf4a9c9424f968eb642a2c953ed4588913bdfae1d (patch)
tree632bc3a86baf652d0f021bae1002c1b608df230f /waftools
parentd9da0c9ce9105b2097d9463e4787b5fac56412cf (diff)
downloadmpv-f4a9c9424f968eb642a2c953ed4588913bdfae1d.tar.bz2
mpv-f4a9c9424f968eb642a2c953ed4588913bdfae1d.tar.xz
win32: request UTF-16 API variants, Vista+ APIs, and COM C macros
Put the Vista+ (_WIN32_WINNT) and the COM C (COBJMACROS) defines into the build system, instead of defining them over and over in the code. Conflicts: video/out/w32_common.c waftools/checks/custom.py
Diffstat (limited to 'waftools')
-rw-r--r--waftools/detections/compiler.py5
-rw-r--r--waftools/fragments/wasapi.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/waftools/detections/compiler.py b/waftools/detections/compiler.py
index 2c22f26a1a..97520ba76e 100644
--- a/waftools/detections/compiler.py
+++ b/waftools/detections/compiler.py
@@ -45,11 +45,16 @@ def __add_clang_flags__(ctx):
"-Wno-tautological-compare",
"-Wno-tautological-constant-out-of-range-compare" ]
+def __add_mswin_flags__(ctx):
+ ctx.env.CFLAGS += ['-D_WIN32_WINNT=0x600', '-DUNICODE', '-DCOBJMACROS']
+
def __add_mingw_flags__(ctx):
+ __add_mswin_flags__(ctx)
ctx.env.CFLAGS += ['-D__USE_MINGW_ANSI_STDIO=1']
ctx.env.LAST_LINKFLAGS += ['-mwindows']
def __add_cygwin_flags__(ctx):
+ __add_mswin_flags__(ctx)
ctx.env.CFLAGS += ['-mwin32']
ctx.env.CFLAGS += ['-U__STRICT_ANSI__']
diff --git a/waftools/fragments/wasapi.c b/waftools/fragments/wasapi.c
index ef3b3f7866..5528ce171b 100644
--- a/waftools/fragments/wasapi.c
+++ b/waftools/fragments/wasapi.c
@@ -1,5 +1,3 @@
-#define COBJMACROS 1
-#define _WIN32_WINNT 0x600
#include <malloc.h>
#include <stdlib.h>
#include <process.h>