From d53d1761253673c0fda41cc4286db13ae7933dbc Mon Sep 17 00:00:00 2001 From: shweet Date: Sat, 3 Oct 2026 22:02:26 -0400 Subject: [PATCH] Define NOMINMAX on Windows so windows.h doesn't break std::max Co-Authored-By: Claude Opus 5.5 --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f78dc0f..5dbefdd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -128,6 +128,10 @@ set(CORE_INCLUDE_DIRS add_library(anm2ed_core STATIC ${CORE_SRC} ${TINYXML2_SRC} ${IMGUI_CORE_SRC}) target_include_directories(anm2ed_core PUBLIC ${CORE_INCLUDE_DIRS}) target_compile_definitions(anm2ed_core PUBLIC IMGUI_DISABLE_OBSOLETE_FUNCTIONS IMGUI_DEBUG_PARANOID IMGUI_ENABLE_DOCKING) +# windows.h otherwise defines min/max macros that break std::min/std::max. +if(WIN32) + target_compile_definitions(anm2ed_core PUBLIC NOMINMAX) +endif() if(NOT MSVC) target_compile_options(anm2ed_core PRIVATE -Wall -Wextra -Wpedantic) endif()