[CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE...
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Mar 2015 09:45:55 +0000 (09:45 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Mar 2015 09:45:55 +0000 (09:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142530

Reviewed by Darin Adler.

Source/ThirdParty/ANGLE:

* ANGLE/ShaderLang.h: Added. Includes include/GLSLANG/ShaderLang.h. Used in WebCore
so we can avoid using ANGLE's EGL headers and use the system-default headers instead.

Source/WebCore:

Include the ANGLE's ShaderLang.h through the new forwarding header. This allows
us to not list Source/ThirdParty/ANGLE/include in the list of inclusion directories
and thus avoid ANGLE's EGL and GLES2/GLES3 headers, defaulting to the system-provided
headers instead.

Source/ThirdParty/ANGLE/include/KHR is still used because ANGLE's khrplatform.h is
required by the ShaderLang.h header. Source/ThirdParty/ANGLE/src is not used for the
whole WebCore library anymore, only the ANGLESupport library.

* CMakeLists.txt:
* platform/graphics/ANGLEWebKitBridge.h:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:

Source/WebKit2:

* CMakeLists.txt: Replace the Source/ThirdParty/ANGLE/include/GLSLANG entry
in the list of inclusion directories for WebKit2 with Source/ThirdParty/ANGLE,
possible due to the new forwarding header for ANGLE's ShaderLang.h.

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

Source/ThirdParty/ANGLE/ANGLE/ShaderLang.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/ChangeLog
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ANGLEWebKitBridge.h
Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog

diff --git a/Source/ThirdParty/ANGLE/ANGLE/ShaderLang.h b/Source/ThirdParty/ANGLE/ANGLE/ShaderLang.h
new file mode 100644 (file)
index 0000000..73f8ed6
--- /dev/null
@@ -0,0 +1 @@
+#include "include/GLSLANG/ShaderLang.h"
index 060b9b3..080da6d 100644 (file)
@@ -1,3 +1,13 @@
+2015-03-17  Zan Dobersek  <zdobersek@igalia.com>
+
+        [CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE's EGL headers
+        https://bugs.webkit.org/show_bug.cgi?id=142530
+
+        Reviewed by Darin Adler.
+
+        * ANGLE/ShaderLang.h: Added. Includes include/GLSLANG/ShaderLang.h. Used in WebCore
+        so we can avoid using ANGLE's EGL headers and use the system-default headers instead.
+
 2015-03-16  Roger Fong  <roger_fong@apple.com>
 
         [Win] Unreviewed build fix after r181571.
index 38cb56f..4bfdd27 100644 (file)
@@ -2991,10 +2991,8 @@ if (WTF_USE_3D_GRAPHICS)
     endif ()
 
     list(APPEND WebCore_INCLUDE_DIRECTORIES
-        "${THIRDPARTY_DIR}/ANGLE/src"
-        "${THIRDPARTY_DIR}/ANGLE/include/"
+        "${THIRDPARTY_DIR}/ANGLE/"
         "${THIRDPARTY_DIR}/ANGLE/include/KHR"
-        "${THIRDPARTY_DIR}/ANGLE/include/GLSLANG"
         "${WEBCORE_DIR}/platform/graphics/gpu"
     )
 
@@ -3522,6 +3520,7 @@ if (WTF_USE_3D_GRAPHICS)
         APPEND
         PROPERTY INCLUDE_DIRECTORIES
             "${THIRDPARTY_DIR}/ANGLE/include"
+            "${THIRDPARTY_DIR}/ANGLE/src"
     )
     list(APPEND WebCore_LIBRARIES ANGLESupport)
     WEBKIT_SET_EXTRA_COMPILER_FLAGS(ANGLESupport IGNORECXX_WARNINGS)
index 15eefde..7568983 100644 (file)
@@ -1,3 +1,23 @@
+2015-03-17  Zan Dobersek  <zdobersek@igalia.com>
+
+        [CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE's EGL headers
+        https://bugs.webkit.org/show_bug.cgi?id=142530
+
+        Reviewed by Darin Adler.
+
+        Include the ANGLE's ShaderLang.h through the new forwarding header. This allows
+        us to not list Source/ThirdParty/ANGLE/include in the list of inclusion directories
+        and thus avoid ANGLE's EGL and GLES2/GLES3 headers, defaulting to the system-provided
+        headers instead.
+
+        Source/ThirdParty/ANGLE/include/KHR is still used because ANGLE's khrplatform.h is
+        required by the ShaderLang.h header. Source/ThirdParty/ANGLE/src is not used for the
+        whole WebCore library anymore, only the ANGLESupport library.
+
+        * CMakeLists.txt:
+        * platform/graphics/ANGLEWebKitBridge.h:
+        * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
+
 2015-03-17  Matt Baker  <mattbaker@apple.com>
 
         Web Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
index f79f033..85a34a3 100644 (file)
@@ -34,7 +34,7 @@
 #elif PLATFORM(WIN)
 #include "GLSLANG/ShaderLang.h"
 #else
-#include "ShaderLang.h"
+#include <ANGLE/ShaderLang.h>
 #endif
 
 namespace WebCore {
index 7d48bc2..7dc98a3 100644 (file)
@@ -39,7 +39,7 @@
 #include "NotImplemented.h"
 #include "PlatformContextCairo.h"
 #include "RefPtrCairo.h"
-#include <GLSLANG/ShaderLang.h>
+#include <ANGLE/ShaderLang.h>
 #include <cairo.h>
 
 #if USE(OPENGL_ES_2)
index b65aee6..8e3cfff 100644 (file)
@@ -149,8 +149,8 @@ set(WebKit2_INCLUDE_DIRECTORIES
 
 if (WTF_USE_3D_GRAPHICS)
     list(APPEND WebKit2_INCLUDE_DIRECTORIES
+        "${THIRDPARTY_DIR}/ANGLE"
         "${THIRDPARTY_DIR}/ANGLE/include/KHR"
-        "${THIRDPARTY_DIR}/ANGLE/include/GLSLANG"
     )
 endif ()
 
index 5c97e52..c72bfe9 100644 (file)
@@ -1,3 +1,14 @@
+2015-03-17  Zan Dobersek  <zdobersek@igalia.com>
+
+        [CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE's EGL headers
+        https://bugs.webkit.org/show_bug.cgi?id=142530
+
+        Reviewed by Darin Adler.
+
+        * CMakeLists.txt: Replace the Source/ThirdParty/ANGLE/include/GLSLANG entry
+        in the list of inclusion directories for WebKit2 with Source/ThirdParty/ANGLE,
+        possible due to the new forwarding header for ANGLE's ShaderLang.h.
+
 2015-03-17  Gwang Yoon Hwang  <yoon@igalia.com>
 
         REGRESSION(r180924): Unable to build WebKitGTK+ with threaded compositor