From 08f1a7fbed4139a0147a067d38af353935d79b57 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Wed, 21 Apr 2021 18:52:14 +0200 Subject: Use Irrlicht functions to query npot texture support --- src/CMakeLists.txt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5298a8f0d..9526e88f9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -102,11 +102,11 @@ endif() option(ENABLE_GLES "Use OpenGL ES instead of OpenGL" FALSE) mark_as_advanced(ENABLE_GLES) if(BUILD_CLIENT) - if(ENABLE_GLES) - find_package(OpenGLES2 REQUIRED) - else() - # transitive dependency from Irrlicht (see longer explanation below) - if(NOT WIN32) + # transitive dependency from Irrlicht (see longer explanation below) + if(NOT WIN32) + if(ENABLE_GLES) + find_package(OpenGLES2 REQUIRED) + else() 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}) @@ -523,10 +523,6 @@ include_directories( ${PROJECT_SOURCE_DIR}/script ) -if(ENABLE_GLES) - include_directories(${OPENGLES2_INCLUDE_DIR} ${EGL_INCLUDE_DIR}) -endif() - if(USE_GETTEXT) include_directories(${GETTEXT_INCLUDE_DIR}) endif() -- cgit v1.2.3