<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[186460] releases/WebKitGTK/webkit-2.8</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/186460">186460</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2015-07-07 06:32:12 -0700 (Tue, 07 Jul 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/184954">r184954</a> - [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)</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit28ChangeLog">releases/WebKitGTK/webkit-2.8/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourceWebCoreCMakeListstxt">releases/WebKitGTK/webkit-2.8/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourceWebCorePlatformGTKcmake">releases/WebKitGTK/webkit-2.8/Source/WebCore/PlatformGTK.cmake</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourcecmakeFindEGLcmake">releases/WebKitGTK/webkit-2.8/Source/cmake/FindEGL.cmake</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourcecmakeFindOpenGLES2cmake">releases/WebKitGTK/webkit-2.8/Source/cmake/FindOpenGLES2.cmake</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourcecmakeOptionsGTKcmake">releases/WebKitGTK/webkit-2.8/Source/cmake/OptionsGTK.cmake</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit28SourcecmakeFindOpenGLcmake">releases/WebKitGTK/webkit-2.8/Source/cmake/FindOpenGL.cmake</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit28SourcecmakeFindGLEScmake">releases/WebKitGTK/webkit-2.8/Source/cmake/FindGLES.cmake</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit28ChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/ChangeLog (186459 => 186460)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/ChangeLog        2015-07-07 12:40:36 UTC (rev 186459)
+++ releases/WebKitGTK/webkit-2.8/ChangeLog        2015-07-07 13:32:12 UTC (rev 186460)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2015-05-28  Carlos Alberto Lopez Perez  &lt;clopez@igalia.com&gt;
+
+        [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).
+
</ins><span class="cx"> 2015-05-15  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.8.3 release.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/CMakeLists.txt (186459 => 186460)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/WebCore/CMakeLists.txt        2015-07-07 12:40:36 UTC (rev 186459)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/CMakeLists.txt        2015-07-07 13:32:12 UTC (rev 186460)
</span><span class="lines">@@ -2954,20 +2954,32 @@
</span><span class="cx">     # these include directories need to be added before the ANGLE directories.
</span><span class="cx">     if (OPENGL_FOUND)
</span><span class="cx">         list(APPEND WebCore_INCLUDE_DIRECTORIES
</span><del>-            ${OPENGL_INCLUDE_DIR}
</del><ins>+            ${OPENGL_INCLUDE_DIRS}
</ins><span class="cx">         )
</span><span class="cx">         list(APPEND WebCore_LIBRARIES
</span><del>-            ${OPENGL_gl_LIBRARY}
</del><ins>+            ${OPENGL_LIBRARIES}
</ins><span class="cx">         )
</span><ins>+        add_definitions(${OPENGL_DEFINITIONS})
</ins><span class="cx">     elseif (OPENGLES2_FOUND)
</span><span class="cx">         list(APPEND WebCore_INCLUDE_DIRECTORIES
</span><del>-            ${OPENGLES2_INCLUDE_DIR}
</del><ins>+            ${OPENGLES2_INCLUDE_DIRS}
</ins><span class="cx">         )
</span><span class="cx">         list(APPEND WebCore_LIBRARIES
</span><span class="cx">             ${OPENGLES2_LIBRARIES}
</span><span class="cx">         )
</span><ins>+        add_definitions(${OPENGLES2_DEFINITIONS})
</ins><span class="cx">     endif ()
</span><span class="cx"> 
</span><ins>+    if (EGL_FOUND)
+        list(APPEND WebCore_INCLUDE_DIRECTORIES
+            ${EGL_INCLUDE_DIRS}
+        )
+        list(APPEND WebCore_LIBRARIES
+            ${EGL_LIBRARIES}
+        )
+        add_definitions(${EGL_DEFINITIONS})
+    endif ()
+
</ins><span class="cx">     list(APPEND WebCore_INCLUDE_DIRECTORIES
</span><span class="cx">         &quot;${THIRDPARTY_DIR}/ANGLE/&quot;
</span><span class="cx">         &quot;${THIRDPARTY_DIR}/ANGLE/include/KHR&quot;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog (186459 => 186460)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog        2015-07-07 12:40:36 UTC (rev 186459)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog        2015-07-07 13:32:12 UTC (rev 186460)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-05-28  Carlos Alberto Lopez Perez  &lt;clopez@igalia.com&gt;
+
+        [CMake] Improve detection and usage of GL/GLES/EGL libraries.
+        https://bugs.webkit.org/show_bug.cgi?id=145408
+
+        Reviewed by Carlos Garcia Campos.
+
+        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)
+
</ins><span class="cx"> 2015-05-07  Philip Chimento  &lt;philip.chimento@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] DrawingBuffer.h used outside of include guard
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourceWebCorePlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/PlatformGTK.cmake (186459 => 186460)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/WebCore/PlatformGTK.cmake        2015-07-07 12:40:36 UTC (rev 186459)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/PlatformGTK.cmake        2015-07-07 13:32:12 UTC (rev 186460)
</span><span class="lines">@@ -394,12 +394,6 @@
</span><span class="cx">     )
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span><del>-if (WTF_USE_EGL)
-    list(APPEND WebCore_LIBRARIES
-        ${EGL_LIBRARY}
-    )
-endif ()
-
</del><span class="cx"> if (WTF_USE_OPENGL_ES_2)
</span><span class="cx">     list(APPEND WebCore_SOURCES
</span><span class="cx">         platform/graphics/opengl/Extensions3DOpenGLES.cpp
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourcecmakeFindEGLcmake"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/cmake/FindEGL.cmake (186459 => 186460)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/cmake/FindEGL.cmake        2015-07-07 12:40:36 UTC (rev 186459)
+++ releases/WebKitGTK/webkit-2.8/Source/cmake/FindEGL.cmake        2015-07-07 13:32:12 UTC (rev 186460)
</span><span class="lines">@@ -2,8 +2,9 @@
</span><span class="cx"> # Once done, this will define
</span><span class="cx"> #
</span><span class="cx"> #  EGL_FOUND - system has EGL installed.
</span><del>-#  EGL_INCLUDE_DIR - directories which contain the EGL headers.
-#  EGL_LIBRARY - libraries required to link against EGL.
</del><ins>+#  EGL_INCLUDE_DIRS - directories which contain the EGL headers.
+#  EGL_LIBRARIES - libraries required to link against EGL.
+#  EGL_DEFINITIONS - Compiler switches required for using EGL.
</ins><span class="cx"> #
</span><span class="cx"> # Copyright (C) 2012 Intel Corporation. All rights reserved.
</span><span class="cx"> #
</span><span class="lines">@@ -28,12 +29,25 @@
</span><span class="cx"> # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
</span><span class="cx"> # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> 
</span><del>-find_path(EGL_INCLUDE_DIR NAMES EGL/egl.h)
</del><span class="cx"> 
</span><ins>+find_package(PkgConfig)
+
+pkg_check_modules(PC_EGL egl)
+
+if (PC_EGL_FOUND)
+    set(EGL_DEFINITIONS ${PC_EGL_CFLAGS_OTHER})
+endif ()
+
+find_path(EGL_INCLUDE_DIRS NAMES EGL/egl.h
+    HINTS ${PC_EGL_INCLUDEDIR} ${PC_EGL_INCLUDE_DIRS}
+)
+
</ins><span class="cx"> set(EGL_NAMES ${EGL_NAMES} egl EGL)
</span><del>-find_library(EGL_LIBRARY NAMES ${EGL_NAMES})
</del><ins>+find_library(EGL_LIBRARIES NAMES ${EGL_NAMES}
+    HINTS ${PC_EGL_LIBDIR} ${PC_EGL_LIBRARY_DIRS}
+)
</ins><span class="cx"> 
</span><span class="cx"> include(FindPackageHandleStandardArgs)
</span><del>-FIND_PACKAGE_HANDLE_STANDARD_ARGS(EGL DEFAULT_MSG EGL_INCLUDE_DIR EGL_LIBRARY)
</del><ins>+FIND_PACKAGE_HANDLE_STANDARD_ARGS(EGL DEFAULT_MSG EGL_INCLUDE_DIRS EGL_LIBRARIES)
</ins><span class="cx"> 
</span><del>-mark_as_advanced(EGL_INCLUDE_DIR EGL_LIBRARY)
</del><ins>+mark_as_advanced(EGL_INCLUDE_DIRS EGL_LIBRARIES)
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourcecmakeFindGLEScmake"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.8/Source/cmake/FindGLES.cmake (186459 => 186460)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/cmake/FindGLES.cmake        2015-07-07 12:40:36 UTC (rev 186459)
+++ releases/WebKitGTK/webkit-2.8/Source/cmake/FindGLES.cmake        2015-07-07 13:32:12 UTC (rev 186460)
</span><span class="lines">@@ -1,38 +0,0 @@
</span><del>-# - Try to find OpenGLES
-# Once done this will define
-#  
-#  OPENGLES2_FOUND        - system has OpenGLESv2 installed.
-#  OPENGLES2_INCLUDE_DIR  - directories which contain the OpenGlEsv2 headers.
-#  OPENGLES2_LIBRARIES    - libraries required to link against OpenGLESv2
-#
-# Copyright (C) 2012 Intel Corporation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
-# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-find_path(OPENGLES2_INCLUDE_DIR NAMES GLES2/gl2.h)
-
-find_library(OPENGLES2_LIBRARY NAMES GLESv2)
-
-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENGLES2 DEFAULT_MSG OPENGLES2_INCLUDE_DIR OPENGLES2_LIBRARY)
-
-mark_as_advanced(OPENGLES2_INCLUDE_DIR OPENGLES2_LIBRARY)
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourcecmakeFindOpenGLcmakefromrev186459releasesWebKitGTKwebkit28SourcecmakeFindEGLcmake"></a>
<div class="copfile"><h4>Copied: releases/WebKitGTK/webkit-2.8/Source/cmake/FindOpenGL.cmake (from rev 186459, releases/WebKitGTK/webkit-2.8/Source/cmake/FindEGL.cmake) (0 => 186460)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/cmake/FindOpenGL.cmake                                (rev 0)
+++ releases/WebKitGTK/webkit-2.8/Source/cmake/FindOpenGL.cmake        2015-07-07 13:32:12 UTC (rev 186460)
</span><span class="lines">@@ -0,0 +1,64 @@
</span><ins>+# - Try to Find OpenGL
+# Once done, this will define
+#
+#  OPENGL_FOUND - system has OpenGL installed.
+#  OPENGL_INCLUDE_DIRS - directories which contain the OpenGL headers.
+#  OPENGL_LIBRARIES - libraries required to link against OpenGL.
+#  OPENGL_DEFINITIONS - Compiler switches required for using OpenGL.
+#
+# Copyright (C) 2015 Igalia S.L.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+find_package(PkgConfig)
+
+pkg_check_modules(PC_OPENGL gl)
+
+if (PC_OPENGL_FOUND)
+    set(OPENGL_DEFINITIONS ${PC_OPENGL_CFLAGS_OTHER})
+endif ()
+
+find_path(OPENGL_INCLUDE_DIRS NAMES GL/gl.h
+    HINTS ${PC_OPENGL_INCLUDEDIR} ${PC_OPENGL_INCLUDE_DIRS}
+)
+
+set(OPENGL_NAMES ${OPENGL_NAMES} gl GL)
+find_library(OPENGL_LIBRARIES NAMES ${OPENGL_NAMES}
+    HINTS ${PC_OPENGL_LIBDIR} ${PC_OPENGL_LIBRARY_DIRS}
+)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENGL DEFAULT_MSG OPENGL_INCLUDE_DIRS OPENGL_LIBRARIES)
+
+mark_as_advanced(OPENGL_INCLUDE_DIRS OPENGL_LIBRARIES)
+
+if (OPENGL_FOUND)
+    # We don't use find_package for GLX because it is part of -lGL, unlike EGL. We need to
+    # have OPENGL_INCLUDE_DIRS as part of the directories check_include_files() looks for in
+    # case OpenGL is installed into a non-standard location.
+    include(CMakePushCheckState)
+    CMAKE_PUSH_CHECK_STATE()
+    set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${OPENGL_INCLUDE_DIRS})
+    check_include_files(&quot;GL/glx.h&quot; GLX_FOUND)
+    CMAKE_POP_CHECK_STATE()
+endif ()
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourcecmakeFindOpenGLES2cmake"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/cmake/FindOpenGLES2.cmake (186459 => 186460)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/cmake/FindOpenGLES2.cmake        2015-07-07 12:40:36 UTC (rev 186459)
+++ releases/WebKitGTK/webkit-2.8/Source/cmake/FindOpenGLES2.cmake        2015-07-07 13:32:12 UTC (rev 186460)
</span><span class="lines">@@ -9,17 +9,19 @@
</span><span class="cx"> pkg_check_modules(PC_OPENGLES2 glesv2)
</span><span class="cx"> 
</span><span class="cx"> if (PC_OPENGLES2_FOUND)
</span><del>-    set(OPENGLES2_INCLUDE_DIRS ${PC_OPENGLES2_INCLUDE_DIRS})
</del><span class="cx">     set(OPENGLES2_DEFINITIONS ${PC_OPENGLES2_CFLAGS_OTHER})
</span><del>-else ()
-    find_path(OPENGLES2_INCLUDE_DIRS NAMES GLES2/gl2.h)
</del><span class="cx"> endif ()
</span><span class="cx"> 
</span><del>-find_library(OPENGLES2_LIBRARIES GLESv2
-    HINTS ${PC_OPENGLES2_LIBRARY_DIRS} ${PC_OPENGLES2_LIBDIR}
</del><ins>+find_path(OPENGLES2_INCLUDE_DIRS NAMES GLES2/gl2.h
+    HINTS ${PC_OPENGLES2_INCLUDEDIR} ${PC_OPENGLES2_INCLUDE_DIRS}
</ins><span class="cx"> )
</span><span class="cx"> 
</span><ins>+set(OPENGLES2_NAMES ${OPENGLES2_NAMES} glesv2 GLESv2)
+find_library(OPENGLES2_LIBRARIES NAMES ${OPENGLES2_NAMES}
+    HINTS ${PC_OPENGLES2_LIBDIR} ${PC_OPENGLES2_LIBRARY_DIRS}
+)
+
</ins><span class="cx"> include(FindPackageHandleStandardArgs)
</span><del>-find_package_handle_standard_args(OpenGLES2 DEFAULT_MSG OPENGLES2_LIBRARIES OPENGLES2_INCLUDE_DIRS)
</del><ins>+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENGLES2 DEFAULT_MSG OPENGLES2_INCLUDE_DIRS OPENGLES2_LIBRARIES)
</ins><span class="cx"> 
</span><del>-mark_as_advanced(OPENGLES2_INCLUDE_DIRS OPENGLES2_LIBRARY)
</del><ins>+mark_as_advanced(OPENGLES2_INCLUDE_DIRS OPENGLES2_LIBRARIES)
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourcecmakeOptionsGTKcmake"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/cmake/OptionsGTK.cmake (186459 => 186460)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/cmake/OptionsGTK.cmake        2015-07-07 12:40:36 UTC (rev 186459)
+++ releases/WebKitGTK/webkit-2.8/Source/cmake/OptionsGTK.cmake        2015-07-07 13:32:12 UTC (rev 186460)
</span><span class="lines">@@ -335,7 +335,7 @@
</span><span class="cx">     set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${OPENGL_INCLUDE_DIR})
</span><span class="cx">     set(CMAKE_REQUIRED_INCLUDES ${REQUIRED_INCLUDES_OLD})
</span><span class="cx"> 
</span><del>-    if (GLX_FOUND)
</del><ins>+    if (GLX_FOUND AND NOT ENABLE_GLES2)
</ins><span class="cx">         set(WTF_USE_GLX 1)
</span><span class="cx">     endif ()
</span><span class="cx"> endif ()
</span></span></pre>
</div>
</div>

</body>
</html>