Qt: First search host_bins directory for executables
authorUwe L. Korn <uwelk@xhochy.com>
Sat, 24 May 2014 12:07:10 +0000 (13:07 +0100)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 29 May 2014 11:39:12 +0000 (19:39 +0800)
This fixes the situation where both Qt4 and Qt5 are installed but the
global moc/rcc/uic commands are provided by Qt4 and Qt5's versions are
not globally installed. VLC previously picked up Qt4's moc/.. version
but built against Qt5.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
configure.ac

index 7ae5cf1..9638bf3 100644 (file)
@@ -3721,9 +3721,10 @@ AC_ARG_ENABLE(qt, [
 AS_IF([test "${enable_qt}" != "no"], [
   PKG_CHECK_MODULES([QT], [Qt5Core >= 5.1.0 Qt5Widgets Qt5Gui], [
       QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix Qt5Core)"
-      AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin])
-      AC_PATH_PROG(RCC, [rcc-qt5 rcc], rcc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin])
-      AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, [${QT_PATH}/bin ${CONTRIB_DIR}/bin])
+      QT_HOST_PATH="$(eval $PKG_CONFIG --variable=host_bins Qt5Core)"
+      AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, [${QT_HOST_PATH} ${QT_PATH}/bin ${CONTRIB_DIR}/bin])
+      AC_PATH_PROG(RCC, [rcc-qt5 rcc], rcc, [${QT_HOST_PATH} ${QT_PATH}/bin ${CONTRIB_DIR}/bin])
+      AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, [${QT_HOST_PATH} ${QT_PATH}/bin ${CONTRIB_DIR}/bin])
     ], [
       PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.6.0],, [
         AS_IF([test -n "${enable_qt}"],[