From e925880f5be8ad3bc2f3dfc564d4944051bfc8b1 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Wed, 8 May 2019 14:55:53 +0100 Subject: [PATCH] Fixed VS 2017 WinXP builds when using local libs Turns out vcpkg enables this for its build too. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 674612a7..b62868ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -338,6 +338,9 @@ else() # Compile it ourselves message(STATUS "Using local SDL2") set(SDL_SHARED_ENABLED_BY_DEFAULT OFF) + if(MSVC) + set(LIBC ON) # Needed to prevent possible 'symbol already defined' errors + endif() add_subdirectory("external/SDL2" EXCLUDE_FROM_ALL) target_link_libraries(CSE2 SDL2-static SDL2main) endif()