Browse Source

Don't require OpenGL when building without GL

pull/255/head
Vladimír Vondruš 8 years ago committed by Squareys
parent
commit
da1a3ccc4d
  1. 8
      CMakeLists.txt

8
CMakeLists.txt

@ -213,13 +213,15 @@ if(BUILD_STATIC)
endif() endif()
# Check dependencies # Check dependencies
if(NOT TARGET_GLES OR TARGET_DESKTOP_GLES) if(WITH_GL OR TARGET_GL)
if(NOT TARGET_GLES OR TARGET_DESKTOP_GLES)
set(OpenGL_GL_PREFERENCE GLVND) # since CMake 3.11 set(OpenGL_GL_PREFERENCE GLVND) # since CMake 3.11
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
elseif(TARGET_GLES2) elseif(TARGET_GLES2)
find_package(OpenGLES2 REQUIRED) find_package(OpenGLES2 REQUIRED)
else() else()
find_package(OpenGLES3 REQUIRED) find_package(OpenGLES3 REQUIRED)
endif()
endif() endif()
# Configuration variables (saved later to configure.h) # Configuration variables (saved later to configure.h)

Loading…
Cancel
Save