From c2c13bc8d0de15cc0701e57d9c236ceec43b7e63 Mon Sep 17 00:00:00 2001 From: Dhruva21 Date: Thu, 9 Nov 2023 11:40:45 -0800 Subject: [PATCH] updated runtime libraries based on build type Signed-off-by: Dhruva21 --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f4fbf0..a505b4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -441,7 +441,11 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") ADD_COMPILE_OPTIONS(-m32 -march=i586) endif() - SET(CMAKE_C_STANDARD_LIBRARIES "Kernel32.lib MSVCRTD.lib vcruntimed.lib ucrtd.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib ws2_32.lib") + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + SET(CMAKE_C_STANDARD_LIBRARIES "Kernel32.lib MSVCRTD.lib vcruntimed.lib ucrtd.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib ws2_32.lib") + elseif(CMAKE_BUILD_TYPE STREQUAL "Release") + SET(CMAKE_C_STANDARD_LIBRARIES "Kernel32.lib MSVCRTD.lib vcruntime.lib ucrt.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib ws2_32.lib") + endif() elseif(TOOLCHAIN STREQUAL "ARM_DS2022") SET(CMAKE_C_COMPILER "armclang.exe")