[GTK][WPE] CFLAGS from pkg-config for (E)GL are not passed to WebKit
authorclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 6 Aug 2017 23:34:58 +0000 (23:34 +0000)
committerclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 6 Aug 2017 23:34:58 +0000 (23:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=175125

Reviewed by Michael Catanzaro.

Some platforms define cflags on the (E)GL pkg-config files that we
need to pass to the build system when including the (E)GL headers.
And we are already doing this when building WebCore (after r184954).

But now we need to do this also on WebKit (former WebKit2) because
we include (E)GL headers (and make use of them) on the UIProcess.

* CMakeLists.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220326 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog

index 26344b18fc2c5d039cd3db6a3372a6050adc3d99..2dfd5af87c8a21eb50310643047309af5ad2eb4e 100644 (file)
@@ -91,6 +91,37 @@ set(WebKit2_SYSTEM_INCLUDE_DIRECTORIES
 )
 
 if (ENABLE_GRAPHICS_CONTEXT_3D)
+    # For platforms that want to use system-provided OpenGL (ES) / EGL headers,
+    # these include directories, libraries or definitions need to be
+    # added before the ANGLE directories.
+    if (USE_OPENGL)
+        list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
+            ${OPENGL_INCLUDE_DIRS}
+        )
+        list(APPEND WebKit2_LIBRARIES
+            ${OPENGL_LIBRARIES}
+        )
+        add_definitions(${OPENGL_DEFINITIONS})
+    elseif (USE_OPENGL_ES_2)
+        list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
+            ${OPENGLES2_INCLUDE_DIRS}
+        )
+        list(APPEND WebKit2_LIBRARIES
+            ${OPENGLES2_LIBRARIES}
+        )
+        add_definitions(${OPENGLES2_DEFINITIONS})
+    endif ()
+
+    if (USE_EGL)
+        list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
+            ${EGL_INCLUDE_DIRS}
+        )
+        list(APPEND WebKit2_LIBRARIES
+            ${EGL_LIBRARIES}
+        )
+        add_definitions(${EGL_DEFINITIONS})
+    endif ()
+
     list(APPEND WebKit2_INCLUDE_DIRECTORIES
         "${THIRDPARTY_DIR}/ANGLE"
         "${THIRDPARTY_DIR}/ANGLE/include/KHR"
index 549038ea0f2de31dc2d9f288a3e868c7c6f9a6fb..4a92a69535f48450564cd2d33df750fac5ee9377 100644 (file)
@@ -1,3 +1,19 @@
+2017-08-06  Carlos Alberto Lopez Perez  <clopez@igalia.com>
+
+        [GTK][WPE] CFLAGS from pkg-config for (E)GL are not passed to WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=175125
+
+        Reviewed by Michael Catanzaro.
+
+        Some platforms define cflags on the (E)GL pkg-config files that we
+        need to pass to the build system when including the (E)GL headers.
+        And we are already doing this when building WebCore (after r184954).
+
+        But now we need to do this also on WebKit (former WebKit2) because
+        we include (E)GL headers (and make use of them) on the UIProcess.
+
+        * CMakeLists.txt:
+
 2017-08-05  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         WebDriver: Implement page load strategy