···17171818 if(WIN32)
1919 set(HAVE_LIBC TRUE)
2020+ # SDL_LIBC must be ON for Windows MSVC builds to link properly
2121+ set(SDL_LIBC ON CACHE BOOL "" FORCE)
2022 endif()
21232224 if(ANDROID)
2325 include_directories(${ANDROID_NDK}/sources/android/cpufeatures)
2426 set(SDL_STATIC_PIC ON CACHE BOOL "" FORCE)
2727+ endif()
2828+2929+ # Force SDL2 to use static runtime on MSVC to match TIC-80's runtime settings
3030+ if(MSVC)
3131+ set(SDL_FORCE_STATIC_VCRT ON CACHE BOOL "" FORCE)
2532 endif()
26332734 add_subdirectory(${THIRDPARTY_DIR}/sdl2)