From d1682cb11eca743addabcc48668fc14a14182eca Mon Sep 17 00:00:00 2001 From: Canberk Pitirli Date: Sun, 1 Nov 2026 13:22:12 +0300 Subject: [PATCH] fix: define DEBUG for msvc debug builds --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5dd37ff..a85cd4b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,9 @@ project(SleakEngine) include(cmake/SleakCommon.cmake) -if(NOT MSVC AND CMAKE_BUILD_TYPE STREQUAL "Debug") +if(MSVC) + add_compile_definitions($<$:DEBUG>) +elseif(CMAKE_BUILD_TYPE STREQUAL "Debug") add_compile_definitions(_DEBUG DEBUG) endif()