Do not find OpenGL or OpenGLES

As we use epoxy we don't need them any more. KWin compiles, links and
runs just fine without ever trying to find OpenGL or OpenGLES.

BUG: 340170
FIXED-IN: 5.2.0
This commit is contained in:
Martin Gräßlin 2014-10-21 08:33:51 +02:00
parent 015c59d9fd
commit 706e22a12b
2 changed files with 2 additions and 68 deletions

View file

@ -106,20 +106,6 @@ set_package_properties(KF5Wayland PROPERTIES
)
add_feature_info("KF5Wayland" KF5Wayland_FOUND "Required for Wayland Compositor Information Module")
if(${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GL")
find_package(OpenGL)
set_package_properties(OpenGL PROPERTIES DESCRIPTION "The OpenGL libraries"
URL "http://www.opengl.org"
TYPE REQUIRED
)
else()
find_package(OpenGLES)
set_package_properties(OpenGLES PROPERTIES DESCRIPTION "The OpenGLES libraries"
URL "http://www.khronos.org/opengles"
TYPE REQUIRED
)
endif()
find_package(EGL)
set_package_properties(EGL PROPERTIES
TYPE RUNTIME
@ -234,11 +220,11 @@ cmake_dependent_option(KWIN_BUILD_KAPPMENU "Build without appmenu support" ON "K
set(KWIN_BUILD_OPENGL FALSE)
set(KWIN_BUILD_OPENGLES FALSE)
if(OPENGL_FOUND AND (${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GL"))
if(${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GL")
set(KWIN_BUILD_OPENGL TRUE)
message("Building KWin with OpenGL support")
endif()
if(OPENGLES_FOUND AND (${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GLESv2"))
if(${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GLESv2")
set(KWIN_BUILD_OPENGLES TRUE)
message("Building KWin with OpenGL ES 2 support")
endif()

View file

@ -1,52 +0,0 @@
# - Try to find OpenGLES
# Once done this will define
#
# OPENGLES_FOUND - system has OpenGLES and EGL
# OPENGL_EGL_FOUND - system has EGL
# OPENGLES_INCLUDE_DIR - the GLES include directory
# OPENGLES_LIBRARY - the GLES library
# OPENGLES_EGL_INCLUDE_DIR - the EGL include directory
# OPENGLES_EGL_LIBRARY - the EGL library
# OPENGLES_LIBRARIES - all libraries needed for OpenGLES
# OPENGLES_INCLUDES - all includes needed for OpenGLES
FIND_PATH(OPENGLES_INCLUDE_DIR GLES2/gl2.h
/usr/openwin/share/include
/opt/graphics/OpenGL/include /usr/X11R6/include
/usr/include
)
FIND_LIBRARY(OPENGLES_LIBRARY
NAMES GLESv2
PATHS /opt/graphics/OpenGL/lib
/usr/openwin/lib
/usr/shlib /usr/X11R6/lib
/usr/lib
)
FIND_PATH(OPENGLES_EGL_INCLUDE_DIR EGL/egl.h
/usr/openwin/share/include
/opt/graphics/OpenGL/include /usr/X11R6/include
/usr/include
)
FIND_LIBRARY(OPENGLES_EGL_LIBRARY
NAMES EGL
PATHS /usr/shlib /usr/X11R6/lib
/usr/lib
)
SET(OPENGL_EGL_FOUND "NO")
IF(OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR)
SET(OPENGL_EGL_FOUND "YES")
ENDIF()
SET(OPENGLES_FOUND "NO")
IF(OPENGLES_LIBRARY AND OPENGLES_INCLUDE_DIR AND
OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR)
SET(OPENGLES_LIBRARIES ${OPENGLES_LIBRARY} ${OPENGLES_LIBRARIES}
${OPENGLES_EGL_LIBRARY})
SET(OPENGLES_INCLUDES ${OPENGLES_INCLUDE_DIR} ${OPENGLES_EGL_INCLUDE_DIR})
SET(OPENGLES_FOUND "YES")
ENDIF()