From 66c00f6d6f4832243533c2cacbb89244d80b5ec2 Mon Sep 17 00:00:00 2001 From: Robear Selwans Date: Mon, 31 Jan 2022 19:53:05 +0200 Subject: [PATCH] Fixed MSVC compilation issues Signed-off-by: Robear Selwans --- meson.build | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index e8dbe51..408cacc 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,5 @@ -project('evol-headers', 'c') +project('evol-headers', 'c', + default_options : [ 'c_std=gnu17' ]) headers_include = include_directories('.') @@ -12,6 +13,11 @@ else evh_c_args += '-DEV_BUILDTYPE_RELEASE=1' endif +cc = meson.get_compiler('c') +if cc.get_id() == 'msvc' + evh_c_args += '/Zc:preprocessor' +endif + # All other targets should follow the same template str_lib = static_library('ev_str', files('buildfiles/ev_str.c'), c_args: evh_c_args) vec_lib = static_library('ev_vec', files('buildfiles/ev_vec.c'), c_args: evh_c_args)