diff --git a/mkspecs/devices/linux-rasp-pi-g++/qmake.conf b/mkspecs/devices/linux-rasp-pi-g++/qmake.conf index 802f0f49a2..a69b446c97 100644 --- a/mkspecs/devices/linux-rasp-pi-g++/qmake.conf +++ b/mkspecs/devices/linux-rasp-pi-g++/qmake.conf @@ -25,20 +25,28 @@ QMAKE_AR = $${CROSS_COMPILE}ar cqs QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy QMAKE_STRIP = $${CROSS_COMPILE}strip -#Circular dependency in GLES2 <-> EGL requires the following abomination -contains(DISTRO, arch) { - QMAKE_LIBS_EGL = -L$$[QT_SYSROOT]/opt/vc/lib -lWFC -lGLESv2 -lEGL -lbcm_host -lvcos -lopenmaxil -} else { - QMAKE_LIBS_EGL = -L$$[QT_SYSROOT]/opt/vc/lib -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -} +QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/opt/vc/lib -QMAKE_LIBS_OPENGL_ES2 = $${QMAKE_LIBS_EGL} -QMAKE_LIBS_OPENVG = $${QMAKE_LIBS_EGL} +QMAKE_LIBDIR_OPENGL_ES2 = $$[QT_SYSROOT]/opt/vc/lib +QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2 QMAKE_INCDIR_EGL = $$[QT_SYSROOT]/opt/vc/include QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL} -QMAKE_CFLAGS += \ +QMAKE_LIBS_EGL = -lEGL -lGLESv2 + +contains(DISTRO, wheezy) { + QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabi \ + -Wl,-rpath-link,$$[QT_SYSROOT]/lib/arm-linux-gnueabi +} else:contains(DISTRO, arch) { + #On principle: no wizardry required +} else { + #Legacy circular dependency + QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 -lEGL +} + +QMAKE_CFLAGS += \ + -marm \ -mfloat-abi=softfp \ -mfpu=vfp \ -mtune=arm1176jzf-s \ @@ -48,6 +56,7 @@ QMAKE_CFLAGS += \ QMAKE_CXXFLAGS = $$QMAKE_CFLAGS EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_pi.cpp +EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host deviceSanityCheckCompiler() diff --git a/src/plugins/platforms/eglfs/eglfs.pro b/src/plugins/platforms/eglfs/eglfs.pro index e0f18d4825..84afb9cff3 100644 --- a/src/plugins/platforms/eglfs/eglfs.pro +++ b/src/plugins/platforms/eglfs/eglfs.pro @@ -34,6 +34,7 @@ QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF !isEmpty(EGLFS_PLATFORM_HOOKS_SOURCES) { HEADERS += $$EGLFS_PLATFORM_HOOKS_HEADERS SOURCES += $$EGLFS_PLATFORM_HOOKS_SOURCES + LIBS += $$EGLFS_PLATFORM_HOOKS_LIBS DEFINES += EGLFS_PLATFORM_HOOKS }