diff --git a/CMakeLists.txt b/CMakeLists.txt index b4a8304..817a21d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,15 @@ set(BVH2_ENABLE_TESTS OFF CACHE BOOL "Disable BVH2 tests (offline builds)" FORCE add_subdirectory(third_party) +if (MSVC AND CMAKE_C_COMPILER_ID MATCHES "Clang") + if (TARGET SDL2) + target_link_options(SDL2 PRIVATE /DEFAULTLIB:ucrt.lib /DEFAULTLIB:vcruntime.lib) + endif() + if (TARGET SDL2-static) + target_link_options(SDL2-static PRIVATE /DEFAULTLIB:ucrt.lib /DEFAULTLIB:vcruntime.lib) + endif() +endif() + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin") set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin") diff --git a/third_party/SDL b/third_party/SDL index 5d24957..f60b23c 160000 --- a/third_party/SDL +++ b/third_party/SDL @@ -1 +1 @@ -Subproject commit 5d249570393f7a37e037abf22cd6012a4cc56a71 +Subproject commit f60b23c933ceb7fe5492acc0bddd6a9de897a203