diff options
-rw-r--r-- | src/CMakeLists.txt | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2627a0b97..ebf5b2871 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -104,15 +104,17 @@ endif() option(ENABLE_GLES "Use OpenGL ES instead of OpenGL" FALSE) mark_as_advanced(ENABLE_GLES) -if(ENABLE_GLES) - find_package(OpenGLES2 REQUIRED) -elseif() - if(NOT WIN32) # Unix probably - set(OPENGL_GL_PREFERENCE "LEGACY" CACHE STRING - "See CMake Policy CMP0072 for reference. GLVND is broken on some nvidia setups") - set(OpenGL_GL_PREFERENCE ${OPENGL_GL_PREFERENCE}) - - find_package(OpenGL REQUIRED) +if(BUILD_CLIENT) + if(ENABLE_GLES) + find_package(OpenGLES2 REQUIRED) + else() + if(NOT WIN32) # Unix probably + set(OPENGL_GL_PREFERENCE "LEGACY" CACHE STRING + "See CMake Policy CMP0072 for reference. GLVND is broken on some nvidia setups") + set(OpenGL_GL_PREFERENCE ${OPENGL_GL_PREFERENCE}) + + find_package(OpenGL REQUIRED) + endif() endif() endif() |