From dd197765c8349c5ba6cfafd24cc0196473bc5ab1 Mon Sep 17 00:00:00 2001 From: psi29a Date: Wed, 16 Jun 2021 08:28:48 +0000 Subject: [PATCH] cmake check to enforce that if someone uses OSG 3.6, that it is at least 3.6.5 --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e1f0a01ca..ee7e29bd7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -355,7 +355,11 @@ if(NOT HAVE_STDINT_H) endif() if(OPENMW_USE_SYSTEM_OSG) - find_package(OpenSceneGraph 3.3.4 REQUIRED ${USED_OSG_COMPONENTS}) + find_package(OpenSceneGraph 3.4.0 REQUIRED ${USED_OSG_COMPONENTS}) + if (${OPENSCENEGRAPH_VERSION} VERSION_GREATER 3.6.2 AND ${OPENSCENEGRAPH_VERSION} VERSION_LESS 3.6.5) + message(FATAL_ERROR "OpenSceneGraph version ${OPENSCENEGRAPH_VERSION} has critical regressions which cause crashes. Please upgrade to 3.6.5 or later. We strongly recommend using the tip of the official 'OpenSceneGraph-3.6' branch or the tip of '3.6' OpenMW/osg (OSGoS).") + endif() + if(OSG_STATIC) find_package(OSGPlugins REQUIRED COMPONENTS ${USED_OSG_PLUGINS}) endif()