From 5f8394469931ed7a23d32caaf07f35f7b6fe0c38 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 25 May 2021 17:52:02 +0200 Subject: [PATCH] Avoid windows header to define min/max macros. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PRĀ #507 use std::min. But on windows, the header define min and max macros and so the compilation is broken. Add `-DNOMINMAX` define to avoid that. --- meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meson.build b/meson.build index fcc0b03bf..403c81a82 100644 --- a/meson.build +++ b/meson.build @@ -56,6 +56,10 @@ if target_machine.system() == 'windows' and static_deps extra_cflags += '-DCURL_STATICLIB' endif +if target_machine.system() == 'windows' + add_project_arguments('-DNOMINMAX', language: 'cpp') +endif + all_deps = [thread_dep, libicu_dep, libzim_dep, pugixml_dep, libcurl_dep, microhttpd_dep, zlib_dep, xapian_dep] inc = include_directories('include', extra_include)