diff --git a/meson.build b/meson.build index a373621..b8a44ef 100644 --- a/meson.build +++ b/meson.build @@ -11,6 +11,8 @@ if cxx.get_id() == 'clang' and cxx.find_library('c++', required: false).found() add_project_arguments(['-stdlib=libc++'], language: 'cpp') add_project_link_arguments(['-stdlib=libc++', '-lc++abi'], language: 'cpp') message('Compiler: LLVM/clang') +elif cxx.get_id() == 'msvc' + add_project_arguments('-DNOMINMAX', language : 'cpp') endif compile_args = [] diff --git a/uvio/platform.hpp b/uvio/platform.hpp index 2a17593..3a03bd3 100644 --- a/uvio/platform.hpp +++ b/uvio/platform.hpp @@ -1,17 +1,8 @@ #pragma once -// define NOMINMAX in front of windows.h -#if !defined(NOMINMAX) && defined(_WIN32) -#define WIN32_LEAN_AND_MEAN -// https://github.com/randombit/botan/issues/1852 -#define NOMINMAX 1 -#endif - +// define macro NOMINMAX in build script #if defined(_WIN32) -// winsock2.h must be in front of windows.h #include -// -#include #else #include #include