summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-12-10 16:30:26 -0500
committerDavid Robillard <d@drobilla.net>2024-12-11 00:19:45 -0500
commit54428ad801d32394d2488c54f1887e7fd45c5bc2 (patch)
tree6ae998efaee5c99304db2c298868f499ccc72863 /meson.build
parent23cdd12bf40c8128b1c8df9127e5110af89ff460 (diff)
downloadzix-54428ad801d32394d2488c54f1887e7fd45c5bc2.tar.gz
zix-54428ad801d32394d2488c54f1887e7fd45c5bc2.tar.bz2
zix-54428ad801d32394d2488c54f1887e7fd45c5bc2.zip
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.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 5 insertions, 1 deletions
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 = [