From 2fa95c6816aa5448fdeaf0ebe3e51a2786be5cbd Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Sun, 11 Feb 2024 10:29:18 +0100 Subject: [PATCH] chore(ricepp): fix windows build --- ricepp/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ricepp/CMakeLists.txt b/ricepp/CMakeLists.txt index 5b860776..659d02e4 100644 --- a/ricepp/CMakeLists.txt +++ b/ricepp/CMakeLists.txt @@ -31,6 +31,14 @@ if(NOT TARGET range-v3) FetchContent_MakeAvailable(range-v3) endif() +if(WIN32) + add_compile_options(/Zc:__cplusplus /utf-8 /wd4267 /wd4244 /wd5219) + # Apply /MT or /MTd (multithread, static version of the run-time library) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") + set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>") + add_compile_definitions(_WIN32_WINNT=0x0601 WINVER=0x0601) +endif() + add_library(ricepp ricepp.cpp) target_include_directories(ricepp PUBLIC include)