Rename ANGLE libs in order to not conflict with other ANGLE libs

This is needed to be able to use Qt (with dynamic ANGLE) in a plugin
while the host runs a different version of Qt (and ANGLE).

In addition to changing the LIBEGL_NAME and LIBGLESV2_NAME variables
you also need to update the value of the LIBRARY definition in the
.def files for ANGLE:

    qtbase/src/3rdparty/angle/src/libGLESv2/libGLESv2[d?].def
    qtbase/src/3rdparty/angle/src/libGLESv2/libEGL[d?].def

Task-number: QTBUG-48431
Change-Id: Idd00d039ba3e20cc0ec7496bee36ed1c90383b0d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This commit is contained in:
Jan Arve Saether 2015-10-29 13:16:31 +01:00 committed by Jan Arve Sæther
parent 5af6efc911
commit b0ec05f27b
11 changed files with 47 additions and 24 deletions

View File

@ -0,0 +1,9 @@
# Renaming these files requires that the LIBRARY entry of their corresponding
# def files are also updated to reflect the name.
# The .def files are found in the angle directories:
#
# qtbase\src\3rdparty\angle\src\libEGL\libEGL[d?].def
# qtbase\src\3rdparty\angle\src\libEGL\libGLESv2[d?].def
LIBEGL_NAME="libEGL"
LIBGLESV2_NAME="libGLESv2"

View File

@ -9,6 +9,8 @@ isEmpty(MSC_VER)|isEmpty(MSVC_VER): error("Source mkspec must set both MSC_VER a
# Baseline: Visual Studio 2005 (8.0), VC++ 14.0
#
include(angle.conf)
MAKEFILE_GENERATOR = MSVC.NET
QMAKE_PLATFORM = win32
QMAKE_COMPILER = msvc
@ -83,8 +85,8 @@ QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib
QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib ws2_32.lib ole32.lib user32.lib advapi32.lib
QMAKE_LIBS_NETWORK = ws2_32.lib
QMAKE_LIBS_OPENGL = glu32.lib opengl32.lib gdi32.lib user32.lib
QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.lib gdi32.lib user32.lib
QMAKE_LIBS_OPENGL_ES2_DEBUG = libEGLd.lib libGLESv2d.lib gdi32.lib user32.lib
QMAKE_LIBS_OPENGL_ES2 = $${LIBEGL_NAME}.lib $${LIBGLESV2_NAME}.lib gdi32.lib user32.lib
QMAKE_LIBS_OPENGL_ES2_DEBUG = $${LIBEGL_NAME}d.lib $${LIBGLESV2_NAME}d.lib gdi32.lib user32.lib
QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
QMAKE_LIBS_QT_ENTRY = -lqtmain

View File

@ -2,6 +2,8 @@
# qmake configuration for common Windows CE
#
include(../angle.conf)
MAKEFILE_GENERATOR = MSVC.NET
QMAKE_PLATFORM += wince win32
CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target
@ -67,8 +69,8 @@ QMAKE_EXTENSION_SHLIB = dll
QMAKE_PREFIX_STATICLIB =
QMAKE_EXTENSION_STATICLIB = lib
QMAKE_LIBS_EGL = libEGL.lib
QMAKE_LIBS_OPENGL_ES2 = libGLESv2.lib
QMAKE_LIBS_EGL = $${LIBEGL_NAME}.lib
QMAKE_LIBS_OPENGL_ES2 = $${LIBGLESV2_NAME}.lib
QMAKE_LIBS_QT_ENTRY = -lqtmain

View File

@ -4,6 +4,8 @@
# Written for Microsoft Visual C++
#
include(../angle.conf)
MAKEFILE_GENERATOR = MSBUILD
QMAKE_COMPILER = msvc
QMAKE_PLATFORM = winrt win32
@ -79,8 +81,8 @@ QMAKE_LIBS += runtimeobject.lib
QMAKE_LIBS_CORE =
QMAKE_LIBS_GUI =
QMAKE_LIBS_NETWORK =
QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.lib
QMAKE_LIBS_OPENGL_ES2_DEBUG = libEGLd.lib libGLESv2d.lib
QMAKE_LIBS_OPENGL_ES2 = $${LIBEGL_NAME}.lib $${LIBGLESV2_NAME}.lib
QMAKE_LIBS_OPENGL_ES2_DEBUG = $${LIBEGL_NAME}d.lib $${LIBGLESV2_NAME}d.lib
QMAKE_LIBS_QT_ENTRY = -lqtmain

View File

@ -8,6 +8,7 @@
#
load(device_config)
include(../common/angle.conf)
MAKEFILE_GENERATOR = MINGW
QMAKE_PLATFORM = win32 mingw
@ -98,8 +99,8 @@ QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32
QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32
QMAKE_LIBS_NETWORK = -lws2_32
QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2 = -llibEGL -llibGLESv2 -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2_DEBUG = -llibEGLd -llibGLESv2d -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2 = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2_DEBUG = -l$${LIBEGL_NAME}d -l$${LIBGLESV2_NAME}d -lgdi32 -luser32
QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain

View File

@ -21,7 +21,7 @@ QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI
QMAKE_LIBS_OPENGL =
QMAKE_LIBS_COMPAT =
QMAKE_LIBS_OPENVG = libopenvg.lib
QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.lib
QMAKE_LIBS_OPENGL_ES2 = $${LIBEGL_NAME}.lib $${LIBGLESV2_NAME}.lib
QMAKE_RC = rc

View File

@ -36,7 +36,7 @@ QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI
QMAKE_LIBS_OPENGL =
QMAKE_LIBS_COMPAT =
QMAKE_LIBS_OPENVG =
QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.lib
QMAKE_LIBS_OPENGL_ES2 = $${LIBEGL_NAME}.lib $${LIBGLESV2_NAME}.lib
QMAKE_LIBDIR_OPENGL_ES2 = $$(NV_WINCE_T2_PLAT)/lib/Test
QMAKE_INCDIR_EGL = $$(NV_WINCE_T2_PLAT)/include
QMAKE_LIBDIR_EGL = $$(NV_WINCE_T2_PLAT)/lib/Test

View File

@ -1,9 +1,10 @@
CONFIG += installed
include(../common/common.pri)
DEF_FILE_TARGET=$${TARGET}
TARGET=$$qtLibraryTarget($${LIBEGL_NAME})
winrt: LIBS_PRIVATE += -ld3d11
LIBS_PRIVATE += -ldxguid -L$$QT_BUILD_TREE/lib -l$$qtLibraryTarget(libGLESv2)
LIBS_PRIVATE += -ldxguid -L$$QT_BUILD_TREE/lib -l$$qtLibraryTarget($${LIBGLESV2_NAME})
DEFINES += GL_APICALL= GL_GLEXT_PROTOTYPES= EGLAPI= LIBEGL_IMPLEMENTATION
@ -14,8 +15,8 @@ SOURCES += \
$$ANGLE_DIR/src/libEGL/libEGL.cpp
!static {
DEF_FILE = $$ANGLE_DIR/src/libEGL/$${TARGET}.def
mingw:equals(QT_ARCH, i386): DEF_FILE = $$ANGLE_DIR/src/libEGL/$${TARGET}_mingw32.def
DEF_FILE = $$ANGLE_DIR/src/libEGL/$${DEF_FILE_TARGET}.def
mingw:equals(QT_ARCH, i386): DEF_FILE = $$ANGLE_DIR/src/libEGL/$${DEF_FILE_TARGET}_mingw32.def
}
egl_headers.files = \

View File

@ -1,5 +1,7 @@
CONFIG += simd installed
include(../common/common.pri)
DEF_FILE_TARGET=$${TARGET}
TARGET=$$qtLibraryTarget($${LIBGLESV2_NAME})
INCLUDEPATH += $$OUT_PWD/.. $$ANGLE_DIR/src/libANGLE
@ -327,8 +329,8 @@ angle_d3d11 {
}
!static {
DEF_FILE = $$ANGLE_DIR/src/libGLESv2/$${TARGET}.def
mingw:equals(QT_ARCH, i386): DEF_FILE = $$ANGLE_DIR/src/libGLESv2/$${TARGET}_mingw32.def
DEF_FILE = $$ANGLE_DIR/src/libGLESv2/$${DEF_FILE_TARGET}.def
mingw:equals(QT_ARCH, i386): DEF_FILE = $$ANGLE_DIR/src/libGLESv2/$${DEF_FILE_TARGET}_mingw32.def
} else {
DEFINES += DllMain=DllMain_ANGLE # prevent symbol from conflicting with the user's DllMain
}

View File

@ -118,11 +118,11 @@ void *QWindowsLibEGL::resolve(const char *name)
bool QWindowsLibEGL::init()
{
#ifdef QT_DEBUG
const char dllName[] = "libEGLd.dll";
#else
const char dllName[] = "libEGL.dll";
const char dllName[] = QT_STRINGIFY(LIBEGL_NAME)
#if defined(QT_DEBUG) && !defined(Q_OS_WINCE)
"d"
#endif
"";
qCDebug(lcQpaGl) << "Qt: Using EGL from" << dllName;
@ -178,11 +178,12 @@ void *QWindowsLibGLESv2::resolve(const char *name)
bool QWindowsLibGLESv2::init()
{
#ifdef QT_DEBUG
const char dllName[] = "libGLESv2d.dll";
#else
const char dllName[] = "libGLESv2.dll";
const char dllName[] = QT_STRINGIFY(LIBGLESV2_NAME)
#if defined(QT_DEBUG) && !defined(Q_OS_WINCE)
"d"
#endif
"";
qCDebug(lcQpaGl) << "Qt: Using OpenGL ES 2.0 from" << dllName;
#if !defined(QT_STATIC) || defined(QT_OPENGL_DYNAMIC)

View File

@ -132,3 +132,6 @@ contains(QT_CONFIG, freetype) {
}
contains(QT_CONFIG, accessibility):include($$PWD/accessible/accessible.pri)
DEFINES *= LIBEGL_NAME=$${LIBEGL_NAME}
DEFINES *= LIBGLESV2_NAME=$${LIBGLESV2_NAME}