|
|
@ -31,6 +31,15 @@ if(NOT OPENMW_USE_SYSTEM_BULLET)
|
|
|
|
set(USE_DOUBLE_PRECISION ${BULLET_USE_DOUBLES} CACHE BOOL "")
|
|
|
|
set(USE_DOUBLE_PRECISION ${BULLET_USE_DOUBLES} CACHE BOOL "")
|
|
|
|
set(BULLET2_MULTITHREADING ON CACHE BOOL "")
|
|
|
|
set(BULLET2_MULTITHREADING ON CACHE BOOL "")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(BULLET_STATIC)
|
|
|
|
|
|
|
|
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()
|
|
|
|
|
|
|
|
|
|
|
|
# master on 12 Mar 2021
|
|
|
|
# master on 12 Mar 2021
|
|
|
|
include(FetchContent)
|
|
|
|
include(FetchContent)
|
|
|
|
FetchContent_Declare(bullet
|
|
|
|
FetchContent_Declare(bullet
|
|
|
@ -61,9 +70,9 @@ if(NOT OPENMW_USE_SYSTEM_MYGUI)
|
|
|
|
set(MYGUI_DONT_USE_OBSOLETE OFF CACHE BOOL "")
|
|
|
|
set(MYGUI_DONT_USE_OBSOLETE OFF CACHE BOOL "")
|
|
|
|
|
|
|
|
|
|
|
|
if(MYGUI_STATIC)
|
|
|
|
if(MYGUI_STATIC)
|
|
|
|
set(BUILD_SHARED_LIBS OFF)
|
|
|
|
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
|
|
|
|
else()
|
|
|
|
else()
|
|
|
|
set(BUILD_SHARED_LIBS ON)
|
|
|
|
set(BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
include(FetchContent)
|
|
|
|
include(FetchContent)
|
|
|
@ -81,8 +90,6 @@ endif()
|
|
|
|
if(NOT OPENMW_USE_SYSTEM_OSG)
|
|
|
|
if(NOT OPENMW_USE_SYSTEM_OSG)
|
|
|
|
cmake_minimum_required(VERSION 3.11) # for FetchContent
|
|
|
|
cmake_minimum_required(VERSION 3.11) # for FetchContent
|
|
|
|
|
|
|
|
|
|
|
|
set(DYNAMIC_OPENTHREADS OFF CACHE BOOL "")
|
|
|
|
|
|
|
|
set(DYNAMIC_OPENSCENEGRAPH OFF CACHE BOOL "")
|
|
|
|
|
|
|
|
set(BUILD_OSG_APPLICATIONS OFF CACHE BOOL "")
|
|
|
|
set(BUILD_OSG_APPLICATIONS OFF CACHE BOOL "")
|
|
|
|
set(BUILD_OSG_DEPRECATED_SERIALIZERS OFF CACHE BOOL "")
|
|
|
|
set(BUILD_OSG_DEPRECATED_SERIALIZERS OFF CACHE BOOL "")
|
|
|
|
set(OSG_FIND_3RD_PARTY_DEPS OFF CACHE BOOL "")
|
|
|
|
set(OSG_FIND_3RD_PARTY_DEPS OFF CACHE BOOL "")
|
|
|
@ -104,9 +111,33 @@ if(NOT OPENMW_USE_SYSTEM_OSG)
|
|
|
|
set(OPENGL_PROFILE "GL2" CACHE STRING "")
|
|
|
|
set(OPENGL_PROFILE "GL2" CACHE STRING "")
|
|
|
|
|
|
|
|
|
|
|
|
if(OSG_STATIC)
|
|
|
|
if(OSG_STATIC)
|
|
|
|
set(BUILD_SHARED_LIBS OFF)
|
|
|
|
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
|
|
|
|
|
|
|
|
set(DYNAMIC_OPENTHREADS OFF CACHE BOOL "" FORCE)
|
|
|
|
|
|
|
|
set(DYNAMIC_OPENSCENEGRAPH OFF CACHE BOOL "" FORCE)
|
|
|
|
else()
|
|
|
|
else()
|
|
|
|
set(BUILD_SHARED_LIBS ON)
|
|
|
|
set(BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE)
|
|
|
|
|
|
|
|
set(DYNAMIC_OPENTHREADS ON CACHE BOOL "" FORCE)
|
|
|
|
|
|
|
|
set(DYNAMIC_OPENSCENEGRAPH ON CACHE BOOL "" FORCE)
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
mark_as_advanced(DYNAMIC_OPENTHREADS DYNAMIC_OPENSCENEGRAPH)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
|
|
|
|
# OSG here inherits C++17 language level because it doesn't specify its own.
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# OSG's `using namespace std` interferes with Windows header files.
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# See https://developercommunity.visualstudio.com/t/error-c2872-byte-ambiguous-symbol/93889
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# An alternative way to work around this without changing the language level is:
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# add_compile_definitions(_HAS_STD_BYTE=0)
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# TODO: Put OSG into its own scope so that this does not leak into Recast below.
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
|
|
|
|
set(OSG_MSVC_VERSIONED_DLL OFF CACHE BOOL "")
|
|
|
|
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
# branch OpenSceneGraph-3.6 on 23 Jan 2021.
|
|
|
|
# branch OpenSceneGraph-3.6 on 23 Jan 2021.
|
|
|
|