From f61b8b312d251f9c8dd33d03d1566fd73019bf08 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 7 Jan 2015 21:33:14 +0100 Subject: 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. --- waftools/detections/compiler.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'waftools/detections') diff --git a/waftools/detections/compiler.py b/waftools/detections/compiler.py index 53b7d24892..a43a713de1 100644 --- a/waftools/detections/compiler.py +++ b/waftools/detections/compiler.py @@ -47,11 +47,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__'] -- cgit v1.2.3