From 0568722245c429247b29846032ed6c5a58af264f Mon Sep 17 00:00:00 2001 From: Harrand Date: Tue, 22 Oct 2024 17:24:07 +0100 Subject: [PATCH] [cmake] on msvc, link statically against runtime library so we dont have to ship that dll aswell --- cmake/compiler.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/compiler.cmake b/cmake/compiler.cmake index 36f82a3b4b..94df0befde 100644 --- a/cmake/compiler.cmake +++ b/cmake/compiler.cmake @@ -12,6 +12,11 @@ endfunction() function(configure_msvc) # TODO target_compile_definitions(topaz PRIVATE -D_CRT_SECURE_NO_WARNINGS) + if(${CMAKE_BUILD_TYPE} MATCHES "debug") + target_link_options(topaz PUBLIC /MTd) + else() + target_link_options(topaz PUBLIC /MT) + endif() endfunction() function(configure_gnu_like)