summaryrefslogtreecommitdiffstats
path: root/src/angle/src/common
diff options
context:
space:
mode:
authorJason Barron <jason.barron@digia.com>2012-10-15 14:16:51 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-24 02:29:15 +0200
commite0c0e83fd5534b24f18d5e02a453182df54933e0 (patch)
treeb0277ef33d668f49a02203de2c99b1cfbaad5291 /src/angle/src/common
parent84d09214bc54b4a0cf9860aa27e78ae27bfd69f9 (diff)
Add ANGLE as a 3rdparty library to Qt.
ANGLE is a component that implements the OpenGL ES 2.0 API on top of DirectX 9. See the following for more info: http://code.google.com/p/angleproject/ ANGLE is now the default configuration on Windows. If you want to use desktop OpenGL, you should build Qt with the following configure options: -opengl desktop To configure Qt to use another OpenGL ES 2 implementation, you should use: -opengl es2 -no-angle Task-number: QTBUG-24207 Change-Id: Iefcbeaa37ed920f431729749ab8333b248fe5134 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/angle/src/common')
-rw-r--r--src/angle/src/common/common.pri53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/angle/src/common/common.pri b/src/angle/src/common/common.pri
new file mode 100644
index 0000000000..e99080d19f
--- /dev/null
+++ b/src/angle/src/common/common.pri
@@ -0,0 +1,53 @@
+include (../config.pri)
+
+INCLUDEPATH += \
+ $$ANGLE_DIR/src \
+ $$ANGLE_DIR/include
+
+LIBS = $$QMAKE_LIBS_CORE $$QMAKE_LIBS_GUI
+
+# DirectX is included in the Windows 8 Kit, but everything else requires the DX SDK.
+win32-msvc2012 {
+ FXC = fxc.exe
+} else {
+ DX_DIR = $$(DXSDK_DIR)
+ isEmpty(DX_DIR) {
+ error("Cannot determine DirectX SDK location. Please set DXSDK_DIR environment variable.")
+ }
+
+ DXINC_DIR = $$quote($${DX_DIR}Include)
+ contains(QT_ARCH, x86_64) {
+ DXLIB_DIR = $$quote($${DX_DIR}Lib\\x64)
+ } else {
+ DXLIB_DIR = $$quote($${DX_DIR}Lib\\x86)
+ }
+
+ FXC = "\"$${DX_DIR}Utilities\\bin\\x86\\fxc.exe\""
+
+ msvc {
+ # Unfortunately MinGW cannot use the DirectX headers from the DX SDK because d3d11shader.h uses
+ # buffer annotation macros (eg: __out, __in) which are not defined in the MinGW copy of
+ # specstrings_strict.h
+ INCLUDEPATH += $$DXINC_DIR
+
+ # Similarly we want the MinGW linker to use the import libraries shipped with the compiler
+ # instead of those from the SDK which cause a crash on startup.
+ LIBS += -L$$DXLIB_DIR
+ }
+}
+
+# Use the DEF files in release mode
+msvc:CONFIG(release, debug|release) {
+ QMAKE_LFLAGS += /DEF:$$ANGLE_DIR/src/$${TARGET}/$${TARGET}.def
+}
+
+HEADERS += \
+ $$ANGLE_DIR/src/common/angleutils.h \
+ $$ANGLE_DIR/src/common/debug.h \
+ $$ANGLE_DIR/src/common/RefCountObject.h \
+ $$ANGLE_DIR/src/common/version.h
+
+SOURCES += \
+ $$ANGLE_DIR/src/common/debug.cpp \
+ $$ANGLE_DIR/src/common/RefCountObject.cpp
+