From 24d90ec54dc44d9df8dc2b498c1ededa6731e434 Mon Sep 17 00:00:00 2001 From: madsbuvi Date: Fri, 22 Jan 2021 14:35:34 +0100 Subject: [PATCH] OSG version check --- CMakeLists.txt | 7 +++++-- README.md | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a5bc45224..f7d00b21c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -259,8 +259,11 @@ if(NOT HAVE_STDINT_H) message(FATAL_ERROR "stdint.h was not found" ) endif() - -find_package(OpenSceneGraph 3.3.4 REQUIRED osgDB osgViewer osgText osgGA osgParticle osgUtil osgFX osgShadow osgAnimation) +set(OSG_VERSION_REQUIRED "3.3.4") +if(BUILD_OPENMW_VR) + set(OSG_VERSION_REQUIRED "3.6.5") +endif() +find_package(OpenSceneGraph ${OSG_VERSION_REQUIRED} REQUIRED osgDB osgViewer osgText osgGA osgParticle osgUtil osgFX osgShadow osgAnimation) include_directories(SYSTEM ${OPENSCENEGRAPH_INCLUDE_DIRS}) set(USED_OSG_PLUGINS diff --git a/README.md b/README.md index 3f9aee844..8cc8e9304 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,9 @@ At this point most mainstream headsets have OpenXR implementations, but some may Building -------- On windows, the fork builds with the same instructions as [building openmw](https://wiki.openmw.org/index.php?title=Development_Environment_Setup#MSVC_2017-2019). -On linux, however, openmw does not package binaries for external dependencies. It is therefore necessary to build your own copy of [my fork of OSG](https://github.com/madsbuvi/osg) that contains stereo fixes, until these are accepted upstream. + +On linux, however, openmw does not package binaries for external dependencies. This fork is written against OSG version 3.6.5 and earlier versions may not work or even compile. +It may therefore be necessary to build your own version of OSG. For now, I advise building [my fork of OSG](https://github.com/madsbuvi/osg) that contain a stereo fix, without which the water shader may break. VR Controls ---------------------