From fff0579658267cae23f1b5d6ae327fb1d71ed7ef Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Sun, 16 Feb 2025 14:10:04 +0100 Subject: [PATCH] compile with WIN32_LEAN_AND_MEAN on Windows --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 00248b88..de2515c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,10 @@ set(default_build_type "Release") SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +if(WIN32) + add_compile_definitions(WIN32_LEAN_AND_MEAN) +endif() + if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) message(STATUS "Setting build type to '${default_build_type}' as none was specified.") set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE)