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()