cmake: Move MYGUI/OSG_STATIC default to top-level

Makes it clear that the USE_SYSTEM variables affect the defaults of
STATIC variables.
pull/593/head
Gleb Mazovetskiy 4 years ago
parent 377bd27aa7
commit daf080ff19

@ -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)

@ -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 "")

Loading…
Cancel
Save