From 0ffc4b8739dcd9dba5773f3622030f4b28b743ff Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Fri, 30 Aug 2024 14:18:24 +0200 Subject: [PATCH] Ask windows to not define `min` and `max`. --- meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meson.build b/meson.build index 42f6e8ce..c089617e 100644 --- a/meson.build +++ b/meson.build @@ -7,6 +7,10 @@ compiler = meson.get_compiler('cpp') add_global_arguments('-DKIWIX_TOOLS_VERSION="@0@"'.format(meson.project_version()), language : 'cpp') +if host_machine.system() == 'windows' + add_project_arguments('-DNOMINMAX', language: 'cpp') +endif + static_linkage = get_option('static-linkage') if static_linkage # Static build is not supported on MacOS