examples: get the right Qt moc binary to use via pkg-config

Should make us do the right thing in cases where both Qt3 and Qt4
are installed.

Fixes #620211.
This commit is contained in:
Tim-Philipp Müller 2010-06-01 13:00:22 +01:00
parent c5c1b6815a
commit 2c21340c79
2 changed files with 7 additions and 1 deletions

View file

@ -291,6 +291,12 @@ PKG_CHECK_MODULES(QT, QtGui >= 4.6, [
HAVE_QT_GV=no
PKG_CHECK_MODULES(QT, QtGui >= 4.0, HAVE_QT=yes, HAVE_QT=no)
])
if test "x$HAVE_QT" = "xyes"; then
AC_MSG_CHECKING([Qt moc])
QT4_MOC=`$PKG_CONFIG --variable=moc_location QtGui`
AC_MSG_RESULT($QT4_MOC)
AC_SUBST(QT4_MOC)
fi
AM_CONDITIONAL(HAVE_QT, test "x$HAVE_QT" = "xyes")
AM_CONDITIONAL(HAVE_QT_GV, test "x$HAVE_QT_GV" = "xyes")

View file

@ -34,7 +34,7 @@ qtgv_xoverlay_LDADD = $(GST_LIBS) $(X_LIBS) $(LIBM) $(QT_LIBS) \
nodist_qtgv_xoverlay_SOURCES = moc_qtgv-xoverlay.cpp
moc_%.cpp:%.h
$(AM_V_GEN)moc $< -o $@
$(AM_V_GEN)$(QT4_MOC) $< -o $@
EXTRA_DIST = $(nodist_qtgv_xoverlay_SOURCES:moc_%.cpp=%.h)
CLEANFILES = $(nodist_qtgv_xoverlay_SOURCES)