Query udev build parameters from pkg-config

Change-Id: Ia3b7329d7359684ee7bf572a7e5fb681105108f4
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Donald Carr 2012-03-02 04:58:33 +00:00 committed by Qt by Nokia
parent b371f3f943
commit 484e2923b4
7 changed files with 19 additions and 4 deletions

View File

@ -1,3 +1,4 @@
SOURCES = libudev.cpp
CONFIG -= qt
LIBS += -ludev
LIBS += $$QMAKE_LIBS_LIBUDEV
INCLUDEPATH += $$QMAKE_INCDIR_LIBUDEV

9
configure vendored
View File

@ -5294,7 +5294,13 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
fi
if [ "$CFG_LIBUDEV" != "no" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libudev "libudev" $L_FLAGS $I_FLAGS $l_FLAGS; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
fi
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libudev "libudev" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_INCDIR_LIBUDEV $QMAKE_LIBS_LIBUDEV; then
CFG_LIBUDEV=yes
QT_CONFIG="$QT_CONFIG libudev"
elif [ "$CFG_LIBUDEV" = "yes" ]; then
@ -6890,6 +6896,7 @@ else
fi
echo "zlib support ........... $CFG_ZLIB"
echo "Session management ..... $CFG_SM"
echo "libudev support ........ $CFG_LIBUDEV"
if [ "$CFG_OPENGL" = "desktop" ]; then
echo "OpenGL support ......... yes (Desktop OpenGL)"

View File

@ -34,6 +34,7 @@ QMAKE_LIBS_OPENGL_ES1 = -lGLES_CM
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
QMAKE_LIBS_OPENVG = -lOpenVG
QMAKE_LIBS_THREAD = -lpthread
QMAKE_LIBS_LIBUDEV = -ludev
QMAKE_CFLAGS_WAYLAND =
QMAKE_INCDIR_WAYLAND =

View File

@ -1,4 +1,6 @@
contains(QT_CONFIG, libudev) {
HEADERS += $$PWD/qudevhelper_p.h $$PWD/qudevicehelper_p.h
SOURCES += $$PWD/qudevhelper.cpp $$PWD/qudevicehelper.cpp
INCLUDEPATH += $$QMAKE_INCDIR_LIBUDEV
}

View File

@ -12,11 +12,11 @@ HEADERS = \
QT += core-private platformsupport-private
LIBS += -ludev
SOURCES = main.cpp \
qevdevkeyboardhandler.cpp \
qevdevkeyboardmanager.cpp
OTHER_FILES += \
evdevkeyboard.json
LIBS += $$QMAKE_LIBS_LIBUDEV

View File

@ -14,3 +14,5 @@ SOURCES = main.cpp \
OTHER_FILES += \
evdevmouse.json
LIBS += $$QMAKE_LIBS_LIBUDEV

View File

@ -16,6 +16,8 @@ QT += core-private platformsupport-private
OTHER_FILES += \
evdevtouch.json
LIBS += $$QMAKE_LIBS_LIBUDEV
# DEFINES += USE_MTDEV
contains(DEFINES, USE_MTDEV): LIBS += -lmtdev