From 826b795bd30d3fc1e0e3e91d89cfc48d4ab33331 Mon Sep 17 00:00:00 2001 From: illnyang <23129500+illnyang@users.noreply.github.com> Date: Sat, 10 Aug 2024 16:08:47 +0200 Subject: [PATCH] Use `MSVC_RUNTIME_LIBRARY` instead of setting compile flags manually --- addons.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons.cmake b/addons.cmake index 50f7075..c2ab4a7 100644 --- a/addons.cmake +++ b/addons.cmake @@ -118,7 +118,7 @@ target_compile_definitions(${ADDON_NAME} PRIVATE __IDP__ MAXSTR=${MAXSTR}) # Adjust output folders if (DEFINED __NT__) # On Windows and for release builds, statically link - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT") + set_target_properties(${ADDON_NAME} PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:DebugDLL>") # Set the destination folder to be in IDA's binary output folder foreach (cfg IN LISTS CMAKE_CONFIGURATION_TYPES)