summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-09-17 09:53:14 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-09-17 10:58:55 (GMT)
commit26e5792c84d15ca8fb90c2f3b0ba3a53e52f242d (patch)
tree971e69d7e7de271ce85e134ff4678697763ef47c /src/opengl
parent0ca968d2244214b465f1186628328f28caa33886 (diff)
downloadQt-26e5792c84d15ca8fb90c2f3b0ba3a53e52f242d.zip
Qt-26e5792c84d15ca8fb90c2f3b0ba3a53e52f242d.tar.gz
Qt-26e5792c84d15ca8fb90c2f3b0ba3a53e52f242d.tar.bz2
Add a QMAKE_LFLAGS_EGL and QMAKE_LFLAGS_OPENGL
When you link cross-compiled applications on Linux, the linker needs to be able to find not just the libraries the application links against (like libQtGui.so), but the libraries' dependencies. E.g. examples/widgets/wiggly links against QtGui. QtGui links against libEGL.so. Therefore, when you link wiggly, the linker has to be able to find libEGL.so, even though wiggly doesn't use EGL directly. To facilitate this, -Wl,rpath-link=/path/to/egl needs to be added to QMAKE_PRL_LIBS in libQtGui.prl and -Wl,rpath-link=/path/to/gl needs to be added to QMAKE_PRL_LIBS in libQtOpenGL.prl. This only needs to be done when the EGL/GL libs are not in the default search directories. As the paths will also change depending on the mkspec, two new variables have been added: QMAKE_LFLAGS_EGL & QMAKE_LFLAGS_OPENGL. These can be set in the mkspec and will be added to the relevent prls. E.g. QMAKE_LFLAGS_EGL += -Wl,-rpath-link=$${QMAKE_LIBDIR_EGL} QMAKE_LFLAGS_OPENGL += -Wl,-rpath-link=$${QMAKE_LIBDIR_OPENGL} Reviewed-by: Marius Storm-Olsen
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/opengl.pro1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro
index da30e3d..d434725 100644
--- a/src/opengl/opengl.pro
+++ b/src/opengl/opengl.pro
@@ -159,4 +159,5 @@ wince*: {
} else {
LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL
+ LIBS += $$QMAKE_LFLAGS_OPENGL
}