summaryrefslogtreecommitdiffstats
path: root/src/angle
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2012-11-30 08:57:37 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-01 08:30:38 +0100
commit95a05904b9dfd48865dcdc0ef8941db794bb5d06 (patch)
treea9ad4dde77d8c0e617df5286ae2c69216064c9aa /src/angle
parentf229db5d57a5976db87d9d69826cae655b5e609a (diff)
ANGLE: Fix debug-and-release builds
Add a 'd' to debug builds to allow both release and debug builds to be used. - Add .def-files for Debug - Build all libraries debug/release - Add description to README.qt - Differentiate debug/release in qmake.conf. Task-number: QTBUG-28196 Change-Id: Ib3081004a6ed2ad71d353244154684d2e0ebbc86 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Diffstat (limited to 'src/angle')
-rw-r--r--src/angle/README.qt9
-rw-r--r--src/angle/src/common/common.pri5
-rw-r--r--src/angle/src/compiler/preprocessor/preprocessor.pro2
-rw-r--r--src/angle/src/compiler/translator_common.pro2
-rw-r--r--src/angle/src/compiler/translator_hlsl.pro2
-rw-r--r--src/angle/src/config.pri14
-rw-r--r--src/angle/src/libEGL/libEGL.pro6
-rw-r--r--src/angle/src/libGLESv2/libGLESv2.pro4
8 files changed, 22 insertions, 22 deletions
diff --git a/src/angle/README.qt b/src/angle/README.qt
index 61023efcd1..a8888604cc 100644
--- a/src/angle/README.qt
+++ b/src/angle/README.qt
@@ -19,6 +19,15 @@ Qt should be kept. If there are new source/header files in ANGLE
(git status -u) then they should be added to the relevant .pro
file before committing.
+The patches in src/angle/patches should be applied on top.
+
+ANGLE ships with .def files for exporting functions in
+3rdparty/angle/src/libEGL/libEGL.def and
+3rdparty/angle/src/libGLESv2/libGLESv2.def.
+Since we build debug and release versions
+(libbEGL.dll/libEGLd.dll, respectively), debug versions of
+the .def files (libEGLd.def) must be created as copies
+with the LIBRARY name entry adapted.
Using a custom ANGLE
-------------------------------------------------------------
diff --git a/src/angle/src/common/common.pri b/src/angle/src/common/common.pri
index 3313462f63..8806c03c95 100644
--- a/src/angle/src/common/common.pri
+++ b/src/angle/src/common/common.pri
@@ -40,11 +40,6 @@ win32-msvc2012 {
}
}
-# 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 \
diff --git a/src/angle/src/compiler/preprocessor/preprocessor.pro b/src/angle/src/compiler/preprocessor/preprocessor.pro
index 12f83d5281..62476008b3 100644
--- a/src/angle/src/compiler/preprocessor/preprocessor.pro
+++ b/src/angle/src/compiler/preprocessor/preprocessor.pro
@@ -1,6 +1,6 @@
TEMPLATE = lib
CONFIG += static
-TARGET = preprocessor
+TARGET = $$qtLibraryTarget(preprocessor)
include(../../config.pri)
diff --git a/src/angle/src/compiler/translator_common.pro b/src/angle/src/compiler/translator_common.pro
index f7f5a8cb6e..2d867a921e 100644
--- a/src/angle/src/compiler/translator_common.pro
+++ b/src/angle/src/compiler/translator_common.pro
@@ -1,6 +1,6 @@
TEMPLATE = lib
CONFIG += static
-TARGET = translator_common
+TARGET = $$qtLibraryTarget(translator_common)
include(../config.pri)
diff --git a/src/angle/src/compiler/translator_hlsl.pro b/src/angle/src/compiler/translator_hlsl.pro
index e4afaec5c5..048e2a48fd 100644
--- a/src/angle/src/compiler/translator_hlsl.pro
+++ b/src/angle/src/compiler/translator_hlsl.pro
@@ -1,6 +1,6 @@
TEMPLATE = lib
CONFIG += static
-TARGET = translator_hlsl
+TARGET = $$qtLibraryTarget(translator_hlsl)
include(../config.pri)
diff --git a/src/angle/src/config.pri b/src/angle/src/config.pri
index e057217309..6ba2cbdf7a 100644
--- a/src/angle/src/config.pri
+++ b/src/angle/src/config.pri
@@ -46,17 +46,6 @@ DEFINES += ANGLE_DISABLE_TRACE \
ANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL0 \
ANGLE_USE_NEW_PREPROCESSOR=1
-# Force release builds for now. Debug builds of ANGLE will generate libraries with
-# the 'd' library suffix, but this means that the library name no longer matches that
-# listed in the DEF file which causes errors at runtime. Using the DEF is mandatory
-# to generate the import library because the symbols are not marked with __declspec
-# and therefore not exported by default. With the import library, the debug build is
-# useless, so just disable until we can find another solution.
-CONFIG -= debug
-CONFIG += release
-
-TARGET = $$qtLibraryTarget($$TARGET)
-
CONFIG(debug, debug|release) {
DEFINES += _DEBUG
} else {
@@ -67,6 +56,9 @@ CONFIG(debug, debug|release) {
CONFIG -= qt
CONFIG += stl rtti_off exceptions c++11
+contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
+contains(QT_CONFIG, build_all):CONFIG += build_all
+
INCLUDEPATH += . .. $$PWD/../include
DESTDIR = $$QT_BUILD_TREE/lib
diff --git a/src/angle/src/libEGL/libEGL.pro b/src/angle/src/libEGL/libEGL.pro
index 82ca914f7e..524e3a9b59 100644
--- a/src/angle/src/libEGL/libEGL.pro
+++ b/src/angle/src/libEGL/libEGL.pro
@@ -1,5 +1,5 @@
TEMPLATE = lib
-TARGET = libEGL
+TARGET = $$qtLibraryTarget(libEGL)
include(../common/common.pri)
@@ -7,7 +7,7 @@ include(../common/common.pri)
# in Surface.cpp, which would otherwise require -ldwmapi, which does not exist on Windows XP
# (QTBUG-27741).
LIBS += -ld3d9 -ldxguid \
- -L$$QT_BUILD_TREE/lib -llibGLESv2
+ -L$$QT_BUILD_TREE/lib -l$$qtLibraryTarget(libGLESv2)
HEADERS += \
$$ANGLE_DIR/src/libEGL/Config.h \
@@ -24,6 +24,8 @@ SOURCES += \
$$ANGLE_DIR/src/libEGL/main.cpp \
$$ANGLE_DIR/src/libEGL/Surface.cpp
+msvc:DEF_FILE = $$ANGLE_DIR/src/libEGL/$${TARGET}.def
+
load(qt_installs)
egl_headers.files = \
diff --git a/src/angle/src/libGLESv2/libGLESv2.pro b/src/angle/src/libGLESv2/libGLESv2.pro
index ae522b2dd5..f4cbfd0494 100644
--- a/src/angle/src/libGLESv2/libGLESv2.pro
+++ b/src/angle/src/libGLESv2/libGLESv2.pro
@@ -1,5 +1,5 @@
TEMPLATE = lib
-TARGET = libGLESv2
+TARGET = $$qtLibraryTarget(libGLESv2)
DEPENDPATH += . shaders
CONFIG += simd
@@ -67,6 +67,8 @@ SOURCES += \
SSE2_SOURCES += $$ANGLE_DIR/src/libGLESv2/TextureSSE2.cpp
+msvc:DEF_FILE = $$ANGLE_DIR/src/libGLESv2/$${TARGET}.def
+
float_converter.target = float_converter
float_converter.commands = python $$ANGLE_DIR/src/libGLESv2/Float16ToFloat32.py \
> $$ANGLE_DIR/src/libGLESv2/Float16ToFloat32.cpp