Avoid windows header to define min/max macros.

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.
This commit is contained in:
Matthieu Gautier 2021-05-25 17:52:02 +02:00
parent 9c0ae835e2
commit 5f83944699
1 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,10 @@ if target_machine.system() == 'windows' and static_deps
extra_cflags += '-DCURL_STATICLIB' extra_cflags += '-DCURL_STATICLIB'
endif 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] all_deps = [thread_dep, libicu_dep, libzim_dep, pugixml_dep, libcurl_dep, microhttpd_dep, zlib_dep, xapian_dep]
inc = include_directories('include', extra_include) inc = include_directories('include', extra_include)