CMake (Windows): Define NOMINMAX and WIN32_LEAN_AND_MEAN
MODIFY
builds/cmake/Modules/ConfigureWindows.cmake
builds/cmake/Modules/ConfigureWindows.cmake
@@ -34,6 +34,10 @@ if(WIN32)
# Disable API deprecation warnings
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+
+ # Prevent some Windows.h global namespace pollution
+ add_definitions(-DNOMINMAX)
+ add_definitions(-DWIN32_LEAN_AND_MEAN)
endif()
if(MSVC)

MODIFY
src/encoder.cpp
src/encoder.cpp
#endif
#ifdef _WIN32
-# define WIN32_LEAN_AND_MEAN
-# ifndef NOMINMAX
-# define NOMINMAX
-# endif
# include <windows.h>
#else
# ifndef LCF_SUPPORT_ICU

MODIFY
src/reader_util.cpp
src/reader_util.cpp
#endif
#ifdef _WIN32
-# define WIN32_LEAN_AND_MEAN
-# ifndef NOMINMAX
-# define NOMINMAX
-# endif
# include <windows.h>
#else
# ifndef LCF_SUPPORT_ICU

CMake (Windows): Define NOMINMAX and WIN32_LEAN_AND_MEAN