@ -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 ( )
# m a s t e r o n 1 2 M a r 2 0 2 1
# m a s t e r o n 1 2 M a r 2 0 2 1
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 ) # f o r F e t c h C o n t e n t
cmake_minimum_required ( VERSION 3.11 ) # f o r F e t c h C o n t e n t
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 )
# O S G h e r e i n h e r i t s C + + 1 7 l a n g u a g e l e v e l b e c a u s e i t d o e s n ' t s p e c i f y i t s o w n .
#
# O S G ' s ` u s i n g n a m e s p a c e s t d ` i n t e r f e r e s w i t h W i n d o w s h e a d e r f i l e s .
#
# S e e h t t p s : / / d e v e l o p e r c o m m u n i t y . v i s u a l s t u d i o . c o m / t / e r r o r - c 2 8 7 2 - b y t e - a m b i g u o u s - s y m b o l / 9 3 8 8 9
#
# A n a l t e r n a t i v e w a y t o w o r k a r o u n d t h i s w i t h o u t c h a n g i n g t h e l a n g u a g e l e v e l i s :
#
# add_compile_definitions ( _HAS_STD_BYTE=0 )
#
# T O D O : P u t O S G i n t o i t s o w n s c o p e s o t h a t t h i s d o e s n o t l e a k i n t o R e c a s t b e l o w .
set ( CMAKE_CXX_STANDARD 11 )
if ( MSVC )
set ( OSG_MSVC_VERSIONED_DLL OFF CACHE BOOL "" )
endif ( )
endif ( )
endif ( )
# b r a n c h O p e n S c e n e G r a p h - 3 . 6 o n 2 3 J a n 2 0 2 1 .
# b r a n c h O p e n S c e n e G r a p h - 3 . 6 o n 2 3 J a n 2 0 2 1 .