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. 16
      CMakeLists.txt

16
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)
set(OpenGL_GL_PREFERENCE GLVND) # since CMake 3.11 if(NOT TARGET_GLES OR TARGET_DESKTOP_GLES)
find_package(OpenGL REQUIRED) set(OpenGL_GL_PREFERENCE GLVND) # since CMake 3.11
elseif(TARGET_GLES2) find_package(OpenGL REQUIRED)
find_package(OpenGLES2 REQUIRED) elseif(TARGET_GLES2)
else() find_package(OpenGLES2 REQUIRED)
find_package(OpenGLES3 REQUIRED) else()
find_package(OpenGLES3 REQUIRED)
endif()
endif() endif()
# Configuration variables (saved later to configure.h) # Configuration variables (saved later to configure.h)

Loading…
Cancel
Save