Add legacy OpenGL linking option

pull/188/head
pirogronian 2018-12-30 21:14:41 +01:00
parent de2a2a892e
commit 2e1a1e9be1
1 changed files with 8 additions and 2 deletions

View File

@ -1,7 +1,13 @@
cmake_minimum_required(VERSION 3.1.0)
if(POLICY CMP0072)
cmake_policy(SET CMP0072 NEW)
set(LEGACY_OPENGL_LIBS OFF CACHE BOOL "Use legacy OpenGL libraries instead of glvnd library (Default: off)")
if (POLICY CMP0072)
if (LEGACY_OPENGL_LIBS)
cmake_policy(SET CMP0072 OLD)
else()
cmake_policy(SET CMP0072 NEW)
endif()
endif()
project(celestia)