From 0dd6e9c698f25969aaf2e6c0fe0ec08ed35aeb42 Mon Sep 17 00:00:00 2001 From: Kristian Ollikainen Date: Fri, 22 Mar 2024 22:17:46 +0200 Subject: [PATCH] CI: Winblows fix 2 I did try to go with self-compiled sherpa first, but it was painful so yeah.. if this doesn't do it I'll try again --- Source/CMakeLists.txt | 4 +++- cmake/modules/FetchDeps.cmake | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 6b6b178..216d37b 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -81,7 +81,9 @@ target_compile_definitions(ChatNotifier PRIVATE $<$:_CRT_SECURE_NO_WARNINGS> ) -# Static runtime if (WIN32) + # Static runtime set_property(TARGET ChatNotifier PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") + # Also allow multiple definitions + target_link_options(ChatNotifier PRIVATE /FORCE:MULTIPLE) endif () diff --git a/cmake/modules/FetchDeps.cmake b/cmake/modules/FetchDeps.cmake index d30d7d7..b35323b 100644 --- a/cmake/modules/FetchDeps.cmake +++ b/cmake/modules/FetchDeps.cmake @@ -97,6 +97,8 @@ FetchContent_Declare( # BUILD_SHARED, BUILD_EXAMPLES to OFF, we don't need them set(BUILD_SHARED OFF CACHE BOOL "" FORCE) set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) +# We want static-static +set(BUILD_FOR_MT ON CACHE BOOL "" FORCE) FetchContent_MakeAvailable(libhv) # Fetch glaze