From 85504b45f6229c2695bc109d771045fcb10fc1e0 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sun, 11 Nov 2018 10:14:50 +0000 Subject: [PATCH] Restructed the setting of the OSG_GL_CONTEXT_VERSION to allow script to set it's default value --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f80696bb..ed0e1d49f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -519,12 +519,12 @@ ELSE() OPTION(OSG_CPP_EXCEPTIONS_AVAILABLE "Set to OFF to disable compile of OSG components that use C++ exceptions." ON) ENDIF() -SET(OSG_GL_CONTEXT_VERSION "1.0" CACHE STRING "GL Context String to pass when creaing graphics contexts") # Map the OSG_GL*_AVAILABLE settings to OpenGL header settings +SET(DEFAULT_GL_CONTEXT_VERSION "1.0") IF (OSG_GL3_AVAILABLE) - SET(OSG_GL_CONTEXT_VERSION "3.3") + SET(DEFAULT_GL_CONTEXT_VERSION "3.3") IF (APPLE) SET(OPENGL_HEADER1 "#include " CACHE STRING "#include<> line for OpenGL Header") @@ -577,6 +577,8 @@ ELSE() ENDIF() ENDIF() +SET(OSG_GL_CONTEXT_VERSION ${DEFAULT_GL_CONTEXT_VERSION} CACHE STRING "GL Context String to pass when creaing graphics contexts") + IF (OSG_GL1_AVAILABLE) SET(OSG_GL1_FEATURES 1) ELSE()