From 3ad2335d115c7a4baa2290554ed998651c072cb9 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Wed, 7 Apr 2021 20:23:39 +0000 Subject: [PATCH] Fix FetchContent Bullet with MSVC --- extern/CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index fc00ae2545..3842b8357b 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -35,9 +35,13 @@ if(NOT OPENMW_USE_SYSTEM_BULLET) set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) else() set(BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE) - if(MSVC) - set(USE_MSVC_RUNTIME_LIBRARY_DLL ON CACHE BOOL "" FORCE) - endif() + endif() + + if(MSVC) + # this setting is badly named - having it off forces the static runtime library, + # but having it on does nothing, letting the defaults get used. + # OpenMW uses the defaults, and you can't mix and match. + set(USE_MSVC_RUNTIME_LIBRARY_DLL ON CACHE BOOL "" FORCE) endif() # master on 12 Mar 2021