From 54428ad801d32394d2488c54f1887e7fd45c5bc2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 10 Dec 2024 16:30:26 -0500 Subject: Clean up platform C flags Remove platform flags from executable (test program) builds, since they shouldn't be needed there (that being the whole point of a portability library), and replace POSIX flags in WIndows with WIN32_LEAN_AND_MEAN. --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 81f6c62..7ab6b9a 100644 --- a/meson.build +++ b/meson.build @@ -170,6 +170,10 @@ elif host_machine.system() in ['dragonfly', 'freebsd', 'netbsd', 'openbsd'] system_c_args += [ '-D_BSD_SOURCE', ] +elif host_machine.system() == 'windows' + system_c_args += [ + '-DWIN32_LEAN_AND_MEAN', + ] else system_c_args += [ '-D_POSIX_C_SOURCE=200809L', @@ -365,7 +369,7 @@ endif # Set any additional arguments required for building libraries or programs library_c_args = platform_c_args + extra_c_args + ['-DZIX_INTERNAL'] library_link_args = [] -program_c_args = platform_c_args + extra_c_args +program_c_args = extra_c_args program_link_args = [] if cc.get_id() == 'emscripten' wasm_c_args = [ -- cgit v1.2.1