diff --git a/CMakeLists.txt b/CMakeLists.txt index 336e8cb524..fc0d1b32c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,11 +111,17 @@ option(QT_STATIC "Link static build of QT into the binaries" FALSE) option(OPENMW_USE_SYSTEM_OSG "Use system provided OpenSceneGraph libraries" ON) option(OSG_STATIC "Link static build of OpenSceneGraph into the binaries" OFF) +if(NOT OPENMW_USE_SYSTEM_OSG) + set(OSG_STATIC ON CACHE BOOL "") +endif() option(OPENMW_USE_SYSTEM_BULLET "Use system provided bullet physics library" ON) option(OPENMW_USE_SYSTEM_MYGUI "Use system provided mygui library" ON) option(MYGUI_STATIC "Link static build of Mygui into the binaries" OFF) +if(NOT OPENMW_USE_SYSTEM_MYGUI) + set(MYGUI_STATIC ON CACHE BOOL "") +endif() option(OPENMW_UNITY_BUILD "Use fewer compilation units to speed up compile time" FALSE) option(OPENMW_LTO_BUILD "Build OpenMW with Link-Time Optimization (Needs ~2GB of RAM)" OFF) diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 4fd4536015..de2f80ddfc 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -54,8 +54,6 @@ endif() if(NOT OPENMW_USE_SYSTEM_MYGUI) cmake_minimum_required(VERSION 3.11) # for FetchContent - set(MYGUI_STATIC ON CACHE BOOL "" PARENT_SCOPE) - set(MYGUI_RENDERSYSTEM 4 CACHE STRING "") set(MYGUI_DISABLE_PLUGINS TRUE CACHE BOOL "") set(MYGUI_BUILD_DEMOS OFF CACHE BOOL "") @@ -78,8 +76,6 @@ endif() if(NOT OPENMW_USE_SYSTEM_OSG) cmake_minimum_required(VERSION 3.11) # for FetchContent - set(OSG_STATIC ON CACHE BOOL "" PARENT_SCOPE) - set(DYNAMIC_OPENTHREADS OFF CACHE BOOL "") set(DYNAMIC_OPENSCENEGRAPH OFF CACHE BOOL "") set(BUILD_OSG_APPLICATIONS OFF CACHE BOOL "")