[vlc-devel] [PATCH] Qt: First search host_bins directory for executables

Uwe L. Korn uwelk at xhochy.com
Sat May 24 14:07:10 CEST 2014


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.
---
 configure.ac | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7ae5cf1..9638bf3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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}"],[
-- 
1.9.2




More information about the vlc-devel mailing list