[CMake] Improve detection and usage of GL/GLES/EGL libraries.
authorclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 May 2015 11:30:52 +0000 (11:30 +0000)
committerclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 May 2015 11:30:52 +0000 (11:30 +0000)
commitf7720a3ec10478e3f262121ddf5886a3af32023a
treeedf13b545fb33591504f337d84306018dbd867d9
parenta21ea41c0785fb8b50ee8a23ca30c395fee53b33
[CMake] Improve detection and usage of GL/GLES/EGL libraries.
https://bugs.webkit.org/show_bug.cgi?id=145408

Reviewed by Carlos Garcia Campos.

.:

* Source/cmake/FindEGL.cmake: Improve detection of EGL libraries.
* Source/cmake/FindGLES.cmake: Removed. It was used by the EGL port.
Remove it and make the EGL port use the improved FindOpenGLES2.cmake
instead.
* Source/cmake/FindOpenGL.cmake: Added. Add module to detect OpenGL
libraries. Detect also GLX libraries.
* Source/cmake/FindOpenGLES2.cmake: Improve detection of OpenGLES-v2
libraries. Use find_path() to get the include path.
* Source/cmake/OptionsEfl.cmake: Use now the improved FindOpenGLES2
module.
* Source/cmake/OptionsGTK.cmake: Set default value for ENABLE_GLES2
depending on the libraries found on the system.
Move the detection of GLX (and the include of CMakePushCheckState)
to FindOpenGL.cmake.
Ensure that we only define USE_GLX when we build with OpenGL
(but not with GLESv2).

Source/WebCore:

No new tests, no behavior changes.

* CMakeLists.txt: Ensure that we include the libraries and includes
for the GL/GLESv2/EGL libraries before including the ANGLE directories.
Define also any CFLAG that the system GL/GLESv2/EGL libraries may need.
* PlatformEfl.cmake: Remove some includes that are now unneeded,
because we are including now the EGL libraries on CMakeLists.txt
* PlatformGTK.cmake: Remove unneeded include (We are including the EGL
libraries now on CMakeLists.txt)

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebCore/PlatformGTK.cmake
Source/cmake/FindEGL.cmake
Source/cmake/FindGLES.cmake [deleted file]
Source/cmake/FindOpenGL.cmake [new file with mode: 0644]
Source/cmake/FindOpenGLES2.cmake
Source/cmake/OptionsEfl.cmake
Source/cmake/OptionsGTK.cmake