[WPE][CMake] Only pass pkg-config CFLAGS from (E)GL when not using libepoxy.
authorclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Aug 2017 15:44:14 +0000 (15:44 +0000)
committerclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Aug 2017 15:44:14 +0000 (15:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=175125

Reviewed by Michael Catanzaro.

Source/WebCore:

No change of behavior, covered by existing tests.

* CMakeLists.txt: Instead of negating 3 times the use of libepoxy
move the logic for (E)GL detection inside an else() block.

Source/WebKit:

* CMakeLists.txt: When using libepoxy avoid passing the CFLAGS from (E)GL,
and instead pass the libepoxy ones.

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

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

index 4a9c75d..a1a5ea6 100644 (file)
@@ -3386,34 +3386,6 @@ 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 AND NOT USE_LIBEPOXY)
-        list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
-            ${OPENGL_INCLUDE_DIRS}
-        )
-        list(APPEND WebCore_LIBRARIES
-            ${OPENGL_LIBRARIES}
-        )
-        add_definitions(${OPENGL_DEFINITIONS})
-    elseif (USE_OPENGL_ES_2 AND NOT USE_LIBEPOXY)
-        list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
-            ${OPENGLES2_INCLUDE_DIRS}
-        )
-        list(APPEND WebCore_LIBRARIES
-            ${OPENGLES2_LIBRARIES}
-        )
-        add_definitions(${OPENGLES2_DEFINITIONS})
-    endif ()
-
-    if (USE_EGL AND NOT USE_LIBEPOXY)
-        list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
-            ${EGL_INCLUDE_DIRS}
-        )
-        list(APPEND WebCore_LIBRARIES
-            ${EGL_LIBRARIES}
-        )
-        add_definitions(${EGL_DEFINITIONS})
-    endif ()
-
     if (USE_LIBEPOXY)
         list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
             ${LIBEPOXY_INCLUDE_DIRS}
@@ -3421,6 +3393,34 @@ if (ENABLE_GRAPHICS_CONTEXT_3D)
         list(APPEND WebCore_LIBRARIES
             ${LIBEPOXY_LIBRARIES}
         )
+    else ()
+        if (USE_OPENGL)
+            list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
+                ${OPENGL_INCLUDE_DIRS}
+            )
+            list(APPEND WebCore_LIBRARIES
+                ${OPENGL_LIBRARIES}
+            )
+            add_definitions(${OPENGL_DEFINITIONS})
+        elseif (USE_OPENGL_ES_2)
+            list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
+                ${OPENGLES2_INCLUDE_DIRS}
+            )
+            list(APPEND WebCore_LIBRARIES
+                ${OPENGLES2_LIBRARIES}
+            )
+            add_definitions(${OPENGLES2_DEFINITIONS})
+        endif ()
+
+        if (USE_EGL)
+            list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
+                ${EGL_INCLUDE_DIRS}
+            )
+            list(APPEND WebCore_LIBRARIES
+                ${EGL_LIBRARIES}
+            )
+            add_definitions(${EGL_DEFINITIONS})
+        endif ()
     endif ()
 
     list(APPEND WebCore_INCLUDE_DIRECTORIES
index fde91d1..64f7313 100644 (file)
@@ -1,3 +1,15 @@
+2017-08-07  Carlos Alberto Lopez Perez  <clopez@igalia.com>
+
+        [WPE][CMake] Only pass pkg-config CFLAGS from (E)GL when not using libepoxy.
+        https://bugs.webkit.org/show_bug.cgi?id=175125
+
+        Reviewed by Michael Catanzaro.
+
+        No change of behavior, covered by existing tests.
+
+        * CMakeLists.txt: Instead of negating 3 times the use of libepoxy
+        move the logic for (E)GL detection inside an else() block.
+
 2017-08-07  Antti Koivisto  <antti@apple.com>
 
         REGRESSION (r219121): Airmail 3 prints header part only.
index 06927f4..64b5abf 100644 (file)
@@ -702,32 +702,41 @@ 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)
+    if (USE_LIBEPOXY)
         list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
-            ${OPENGL_INCLUDE_DIRS}
+            ${LIBEPOXY_INCLUDE_DIRS}
         )
         list(APPEND WebKit2_LIBRARIES
-            ${OPENGL_LIBRARIES}
+            ${LIBEPOXY_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 ()
+    else ()
+        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})
+        if (USE_EGL)
+            list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
+                ${EGL_INCLUDE_DIRS}
+            )
+            list(APPEND WebKit2_LIBRARIES
+                ${EGL_LIBRARIES}
+            )
+            add_definitions(${EGL_DEFINITIONS})
+        endif ()
     endif ()
 
     list(APPEND WebKit2_INCLUDE_DIRECTORIES
index dc8f348..dd3ea9a 100644 (file)
@@ -1,5 +1,15 @@
 2017-08-07  Carlos Alberto Lopez Perez  <clopez@igalia.com>
 
+        [WPE][CMake] Only pass pkg-config CFLAGS from (E)GL when not using libepoxy.
+        https://bugs.webkit.org/show_bug.cgi?id=175125
+
+        Reviewed by Michael Catanzaro.
+
+        * CMakeLists.txt: When using libepoxy avoid passing the CFLAGS from (E)GL,
+        and instead pass the libepoxy ones.
+
+2017-08-07  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