Use WIN32_LEAN_AND_MEAN on Windows

This makes Windows.h includes less headers that we don't want and will
help with compilation.
This commit is contained in:
Corentin Wallez 2017-07-12 12:55:15 -04:00 committed by Corentin Wallez
parent 275817a93a
commit 4db6327f78
1 changed files with 2 additions and 0 deletions

View File

@ -67,6 +67,8 @@ endif()
if (WIN32)
# Define NOMINMAX to prevent conflicts between std::min/max and the min/max macros in WinDef.h
list(APPEND NXT_DEFS "NOMINMAX")
# Avoid Windows.h including a lot of headers
list(APPEND NXT_DEFS "WIN32_LEAN_AND_MEAN")
# Remove compile error where the mock NXT creates too many sections for the old obj format.
list(APPEND NXT_FLAGS "/bigobj")
endif()