diff --git a/common/build-style/qmake.sh b/common/build-style/qmake.sh index abd4f92548c..1966b6c4b53 100644 --- a/common/build-style/qmake.sh +++ b/common/build-style/qmake.sh @@ -2,7 +2,19 @@ # This helper is for templates using Qt4/Qt5 qmake. # do_configure() { - qmake ${configure_args} \ + local qmake + if [ -x "/usr/lib/qt5/bin/qmake" ]; then + # Qt5 qmake + qmake="/usr/lib/qt5/bin/qmake" + fi + if [ -x "/usr/lib/qt/bin/qmake" ]; then + # Qt4 qmake + qmake="/usr/lib/qt/bin/qmake" + fi + if [ -z "${qmake}" ]; then + msg_error "${pkgver}: Could not find qmake - missing in hostdepends?\n" + fi + ${qmake} ${configure_args} \ PREFIX=/usr \ LIB=/usr/lib \ QMAKE_CC=$CC QMAKE_CXX=$CXX QMAKE_LINK=$CXX \