Permalink
Browse files

[Qt] Fix build with ANGLE on platforms that provide EGL/GLESv2

https://bugs.webkit.org/show_bug.cgi?id=95965

Reviewed by Tor Arne Vestbø.

.:

Add ANGLE as separate static library to the build and dependencies.

* Source/api.pri:
* WebKit.pro:

Source/ThirdParty/ANGLE:

Add build rules to build ANGLE as a static library for the Qt port.

* ANGLE.pri: Added.
* ANGLE.pro: Added.
* DerivedSources.pri: Added.
* Target.pri: Added.

Source/WebCore:

Moved all ANGLE build rules from here to Source/Thirty/ANGLE and
instead depend on the new library with a simple WEBKIT += ANGLE.

* DerivedSources.pri:
* Target.pri:
* platform/graphics/ANGLEWebKitBridge.h: Simplify the include statement
for the internal shader compiler API, aligned with the other platforms.

Source/WebKit:

Depend on ANGLE if necessary, due to the use WebCore types that pull in ANGLE
headers (GraphicsContext3D.h in particular).

* WebKit1.pro:

Source/WebKit2:

Depend on ANGLE if necessary, due to the use WebCore types that pull in ANGLE
headers (GraphicsContext3D.h in particular).

* Target.pri:

Tools:

Add ANGLE as a static library module to the Qt WebKit build system.

* qmake/mkspecs/features/default_post.prf:
* qmake/mkspecs/modules/angle.prf: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information...
tronical committed Sep 6, 2012
1 parent d400626 commit 43f90141d41f16ec0f15d491385b82298f3c8f1d
View
@@ -1,3 +1,15 @@
+2012-09-06 Simon Hausmann <simon.hausmann@nokia.com>
+
+ [Qt] Fix build with ANGLE on platforms that provide EGL/GLESv2
+ https://bugs.webkit.org/show_bug.cgi?id=95965
+
+ Reviewed by Tor Arne Vestbø.
+
+ Add ANGLE as separate static library to the build and dependencies.
+
+ * Source/api.pri:
+ * WebKit.pro:
+
2012-09-05 George Staikos <staikos@webkit.org>
[BlackBerry] Match th ebuild flags from the platform library
@@ -0,0 +1,12 @@
+# -------------------------------------------------------------------
+# This file contains shared rules used both when building ANGLE
+# itself, and by targets that use ANGLE.
+#
+# See 'Tools/qmake/README' for an overview of the build system
+# -------------------------------------------------------------------
+
+SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source/ThirdParty/ANGLE
+
+INCLUDEPATH += \
+ $$SOURCE_DIR/include/GLSLANG
+
@@ -0,0 +1,14 @@
+# -------------------------------------------------------------------
+# Main project file for ANGLE
+#
+# See 'Tools/qmake/README' for an overview of the build system
+# -------------------------------------------------------------------
+
+TEMPLATE = subdirs
+
+derived_sources.file = DerivedSources.pri
+target.file = Target.pri
+
+SUBDIRS += derived_sources target
+
+addStrictSubdirOrderBetween(derived_sources, target)
@@ -1,3 +1,17 @@
+2012-09-06 Simon Hausmann <simon.hausmann@nokia.com>
+
+ [Qt] Fix build with ANGLE on platforms that provide EGL/GLESv2
+ https://bugs.webkit.org/show_bug.cgi?id=95965
+
+ Reviewed by Tor Arne Vestbø.
+
+ Add build rules to build ANGLE as a static library for the Qt port.
+
+ * ANGLE.pri: Added.
+ * ANGLE.pro: Added.
+ * DerivedSources.pri: Added.
+ * Target.pri: Added.
+
2012-08-24 Joshua Netterfield <jnetterfield@rim.com>
[CSS Shaders] [ANGLE] RenameFunction::RenameFunction may store references to temporary string
@@ -0,0 +1,38 @@
+# -------------------------------------------------------------------
+# Derived sources for ANGLE
+#
+# See 'Tools/qmake/README' for an overview of the build system
+# -------------------------------------------------------------------
+
+# This file is both a top level target, and included from Target.pri,
+# so that the resulting generated sources can be added to SOURCES.
+# We only set the template if we're a top level target, so that we
+# don't override what Target.pri has already set.
+sanitizedFile = $$toSanitizedPath($$_FILE_)
+equals(sanitizedFile, $$toSanitizedPath($$_PRO_FILE_)):TEMPLATE = derived
+
+ANGLE_FLEX_SOURCES = \
+ $$PWD/src/compiler/glslang.l \
+ $$PWD/src/compiler/preprocessor/new/Tokenizer.l
+
+angleflex.output = ${QMAKE_FILE_BASE}_lex.cpp
+angleflex.input = ANGLE_FLEX_SOURCES
+angleflex.commands = flex --noline --nounistd --outfile=${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
+GENERATORS += angleflex
+
+ANGLE_BISON_SOURCES = \
+ $$PWD/src/compiler/glslang.y \
+ $$PWD/src/compiler/preprocessor/new/ExpressionParser.y
+
+anglebison_decl.output = ${QMAKE_FILE_BASE}_tab.h
+anglebison_decl.input = ANGLE_BISON_SOURCES
+anglebison_decl.commands = bison --no-lines --skeleton=yacc.c --defines=${QMAKE_FILE_OUT} --output=${QMAKE_FUNC_FILE_OUT_PATH}$${QMAKE_DIR_SEP}${QMAKE_FILE_OUT_BASE}.cpp ${QMAKE_FILE_IN}
+anglebison_decl.variable_out = GENERATED_FILES
+GENERATORS += anglebison_decl
+
+anglebison_impl.input = ANGLE_BISON_SOURCES
+anglebison_impl.commands = $$escape_expand(\\n)
+anglebison_impl.depends = $$GENERATED_SOURCES_DESTDIR/${QMAKE_FILE_BASE}_tab.h
+anglebison_impl.output = ${QMAKE_FILE_BASE}_tab.cpp
+GENERATORS += anglebison_impl
+
@@ -0,0 +1,164 @@
+# -------------------------------------------------------------------
+# Target file for the ANGLE static library
+#
+# See 'Tools/qmake/README' for an overview of the build system
+# -------------------------------------------------------------------
+
+TEMPLATE = lib
+TARGET = ANGLE
+
+include(ANGLE.pri)
+
+CONFIG += staticlib
+
+INCLUDEPATH += \
+ $$SOURCE_DIR/src \
+ $$SOURCE_DIR/src/compiler/preprocessor/new \
+ $$SOURCE_DIR/include
+
+HEADERS += \
+ src/compiler/BaseTypes.h \
+ src/compiler/BuiltInFunctionEmulator.h \
+ src/compiler/Common.h \
+ src/compiler/ConstantUnion.h \
+ src/compiler/debug.h \
+ src/compiler/depgraph/DependencyGraph.h \
+ src/compiler/depgraph/DependencyGraphBuilder.h \
+ src/compiler/depgraph/DependencyGraphOutput.h \
+ src/compiler/DetectDiscontinuity.h \
+ src/compiler/DetectRecursion.h \
+ src/compiler/Diagnostics.h \
+ src/compiler/DirectiveHandler.h \
+ src/compiler/ExtensionBehavior.h \
+ src/compiler/ForLoopUnroll.h \
+ src/compiler/glslang.h \
+ src/compiler/InfoSink.h \
+ src/compiler/InitializeDll.h \
+ src/compiler/InitializeGlobals.h \
+ src/compiler/Initialize.h \
+ src/compiler/InitializeParseContext.h \
+ src/compiler/intermediate.h \
+ src/compiler/localintermediate.h \
+ src/compiler/MMap.h \
+ src/compiler/MapLongVariableNames.h \
+ src/compiler/osinclude.h \
+ src/compiler/Pragma.h \
+ src/compiler/preprocessor/atom.h \
+ src/compiler/preprocessor/compile.h \
+ src/compiler/preprocessor/cpp.h \
+ src/compiler/preprocessor/length_limits.h \
+ src/compiler/preprocessor/memory.h \
+ src/compiler/preprocessor/new/Diagnostics.h \
+ src/compiler/preprocessor/new/DirectiveHandler.h \
+ src/compiler/preprocessor/new/DirectiveParser.h \
+ src/compiler/preprocessor/new/Input.h \
+ src/compiler/preprocessor/new/Lexer.h \
+ src/compiler/preprocessor/new/Macro.h \
+ src/compiler/preprocessor/new/MacroExpander.h \
+ src/compiler/preprocessor/new/Preprocessor.h \
+ src/compiler/preprocessor/new/SourceLocation.h \
+ src/compiler/preprocessor/new/Token.h \
+ src/compiler/preprocessor/new/Tokenizer.h \
+ src/compiler/preprocessor/parser.h \
+ src/compiler/preprocessor/preprocess.h \
+ src/compiler/preprocessor/scanner.h \
+ src/compiler/preprocessor/slglobals.h \
+ src/compiler/preprocessor/symbols.h \
+ src/compiler/preprocessor/tokens.h \
+ src/compiler/OutputESSL.h \
+ src/compiler/OutputGLSL.h \
+ src/compiler/OutputGLSLBase.h \
+ src/compiler/OutputHLSL.h \
+ src/compiler/ParseHelper.h \
+ src/compiler/PoolAlloc.h \
+ src/compiler/QualifierAlive.h \
+ src/compiler/RemoveTree.h \
+ src/compiler/RenameFunction.h \
+ src/compiler/SearchSymbol.h \
+ src/compiler/ShHandle.h \
+ src/compiler/SymbolTable.h \
+ src/compiler/timing/RestrictFragmentShaderTiming.h \
+ src/compiler/timing/RestrictVertexShaderTiming.h \
+ src/compiler/TranslatorESSL.h \
+ src/compiler/TranslatorGLSL.h \
+ src/compiler/TranslatorHLSL.h \
+ src/compiler/Types.h \
+ src/compiler/UnfoldShortCircuit.h \
+ src/compiler/util.h \
+ src/compiler/ValidateLimitations.h \
+ src/compiler/VariableInfo.h \
+ src/compiler/VersionGLSL.h
+
+SOURCES += \
+ src/compiler/BuiltInFunctionEmulator.cpp \
+ src/compiler/CodeGenGLSL.cpp \
+ src/compiler/Compiler.cpp \
+ src/compiler/debug.cpp \
+ src/compiler/depgraph/DependencyGraph.cpp \
+ src/compiler/depgraph/DependencyGraphBuilder.cpp \
+ src/compiler/depgraph/DependencyGraphOutput.cpp \
+ src/compiler/depgraph/DependencyGraphTraverse.cpp \
+ src/compiler/DetectDiscontinuity.cpp \
+ src/compiler/DetectRecursion.cpp \
+ src/compiler/Diagnostics.cpp \
+ src/compiler/DirectiveHandler.cpp \
+ src/compiler/ForLoopUnroll.cpp \
+ src/compiler/InfoSink.cpp \
+ src/compiler/Initialize.cpp \
+ src/compiler/InitializeDll.cpp \
+ src/compiler/InitializeParseContext.cpp \
+ src/compiler/Intermediate.cpp \
+ src/compiler/intermOut.cpp \
+ src/compiler/IntermTraverse.cpp \
+ src/compiler/MapLongVariableNames.cpp \
+ src/compiler/OutputESSL.cpp \
+ src/compiler/OutputGLSL.cpp \
+ src/compiler/OutputGLSLBase.cpp \
+ src/compiler/OutputHLSL.cpp \
+ src/compiler/parseConst.cpp \
+ src/compiler/ParseHelper.cpp \
+ src/compiler/PoolAlloc.cpp \
+ src/compiler/QualifierAlive.cpp \
+ src/compiler/RemoveTree.cpp \
+ src/compiler/SearchSymbol.cpp \
+ src/compiler/ShaderLang.cpp \
+ src/compiler/SymbolTable.cpp \
+ src/compiler/timing/RestrictFragmentShaderTiming.cpp \
+ src/compiler/timing/RestrictVertexShaderTiming.cpp \
+ src/compiler/TranslatorESSL.cpp \
+ src/compiler/TranslatorGLSL.cpp \
+ src/compiler/TranslatorHLSL.cpp \
+ src/compiler/UnfoldShortCircuit.cpp \
+ src/compiler/util.cpp \
+ src/compiler/ValidateLimitations.cpp \
+ src/compiler/VariableInfo.cpp \
+ src/compiler/VersionGLSL.cpp \
+ src/compiler/preprocessor/atom.c \
+ src/compiler/preprocessor/cpp.c \
+ src/compiler/preprocessor/cppstruct.c \
+ src/compiler/preprocessor/memory.c \
+ src/compiler/preprocessor/new/DiagnosticsBase.cpp \
+ src/compiler/preprocessor/new/DirectiveHandlerBase.cpp \
+ src/compiler/preprocessor/new/DirectiveParser.cpp \
+ src/compiler/preprocessor/new/Input.cpp \
+ src/compiler/preprocessor/new/Lexer.cpp \
+ src/compiler/preprocessor/new/Macro.cpp \
+ src/compiler/preprocessor/new/MacroExpander.cpp \
+ src/compiler/preprocessor/new/Preprocessor.cpp \
+ src/compiler/preprocessor/new/Token.cpp \
+ src/compiler/preprocessor/scanner.c \
+ src/compiler/preprocessor/symbols.c \
+ src/compiler/preprocessor/tokens.c
+
+win32: SOURCES += src/compiler/ossource_win.cpp
+else: SOURCES += src/compiler/ossource_posix.cpp
+
+# Make sure the derived sources are built
+include(DerivedSources.pri)
+
+*g++* {
+ QMAKE_CXXFLAGS += -Wno-unused-variable -Wno-missing-noreturn -Wno-unused-function -Wno-reorder -Wno-error -Wno-unknown-pragmas -Wno-undef
+}
+
+# We do not need anything from Qt
+QT =
View
@@ -1,3 +1,18 @@
+2012-09-06 Simon Hausmann <simon.hausmann@nokia.com>
+
+ [Qt] Fix build with ANGLE on platforms that provide EGL/GLESv2
+ https://bugs.webkit.org/show_bug.cgi?id=95965
+
+ Reviewed by Tor Arne Vestbø.
+
+ Moved all ANGLE build rules from here to Source/Thirty/ANGLE and
+ instead depend on the new library with a simple WEBKIT += ANGLE.
+
+ * DerivedSources.pri:
+ * Target.pri:
+ * platform/graphics/ANGLEWebKitBridge.h: Simplify the include statement
+ for the internal shader compiler API, aligned with the other platforms.
+
2012-09-06 Kangil Han <kangil.han@samsung.com>
[EFL] Keep placeholder text visible until first input from user.
@@ -950,35 +950,3 @@ webkitversion.clean = ${QMAKE_FUNC_FILE_OUT_PATH}/WebKitVersion.h
webkitversion.add_output_to_sources = false
GENERATORS += webkitversion
-# Generator 12: Angle parsers
-contains(DEFINES, WTF_USE_3D_GRAPHICS=1) {
-
- ANGLE_DIR = $$replace(PWD, "WebCore", "ThirdParty/ANGLE")
-
- ANGLE_FLEX_SOURCES = \
- $$ANGLE_DIR/src/compiler/glslang.l \
- $$ANGLE_DIR/src/compiler/preprocessor/new/Tokenizer.l
-
- angleflex.output = ${QMAKE_FILE_BASE}_lex.cpp
- angleflex.input = ANGLE_FLEX_SOURCES
- angleflex.commands = flex --noline --nounistd --outfile=${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
- *g++*: angleflex.variable_out = ANGLE_SOURCES
- GENERATORS += angleflex
-
- ANGLE_BISON_SOURCES = \
- $$ANGLE_DIR/src/compiler/glslang.y \
- $$ANGLE_DIR/src/compiler/preprocessor/new/ExpressionParser.y
-
- anglebison_decl.output = ${QMAKE_FILE_BASE}_tab.h
- anglebison_decl.input = ANGLE_BISON_SOURCES
- anglebison_decl.commands = bison --no-lines --skeleton=yacc.c --defines=${QMAKE_FILE_OUT} --output=${QMAKE_FUNC_FILE_OUT_PATH}$${QMAKE_DIR_SEP}${QMAKE_FILE_OUT_BASE}.cpp ${QMAKE_FILE_IN}
- anglebison_decl.variable_out = GENERATED_FILES
- GENERATORS += anglebison_decl
-
- anglebison_impl.input = ANGLE_BISON_SOURCES
- anglebison_impl.commands = $$escape_expand(\\n)
- anglebison_impl.depends = ${QMAKE_FILE_BASE}_tab.h
- anglebison_impl.output = ${QMAKE_FILE_BASE}_tab.cpp
- *g++*: anglebison_impl.variable_out = ANGLE_SOURCES
- GENERATORS += anglebison_impl
-}
Oops, something went wrong.

0 comments on commit 43f9014

Please sign in to comment.