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)