use pkg-config supplied CFLAGS when building with EGL

e.g., -DEGL_API_FB=1 is required for freescale's gpu-viv-bin-imx6 fb
driver.

Initial-patch-by: Fatih Aşıcı <fatih.asici@gmail.com>
Change-Id: I8c8cd60591605e0bc33fcf9de3bfb6ea0d86a570
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Oswald Buddenhagen 2013-10-07 20:07:07 +02:00 committed by The Qt Project
parent 8f0654ceb8
commit 5d4eda7833
2 changed files with 3 additions and 0 deletions

1
configure vendored
View File

@ -5501,6 +5501,7 @@ elif [ "$CFG_EGL" != "no" ]; then
QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
QMakeVar set QMAKE_CFLAGS_EGL "`echo " $QMAKE_CFLAGS_EGL " | sed -e 's, -I[^ ]* , ,g;s,^ ,,;s, $,,'`"
fi # detect EGL support
if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
CFG_EGL=yes

View File

@ -14,6 +14,8 @@ wince*:contains(QT_CONFIG, opengles1) {
} else {
INCLUDEPATH += $$QMAKE_INCDIR_EGL
LIBS_PRIVATE += $$QMAKE_LIBS_EGL
QMAKE_CFLAGS += $$QMAKE_CFLAGS_EGL
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_EGL
LIBS += $$QMAKE_LFLAGS_EGL
for(p, QMAKE_LIBDIR_EGL) {
exists($$p):LIBS_PRIVATE += -L$$p