The 'qmake' installed on systems with Qt5 will generally default to
using that version. Despite the Qt4 requirement in the find_package()
directive, this will break even if Qt4 is installed.
This overrides the qmake version used to the check.
find_package(PkgConfig)
pkg_check_modules(PKGDEPS REQUIRED ${PKGDEPS})
+FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 qmake-mac)
find_package(Qt4 REQUIRED)
# Find the platform's thread library (needed for boost-thread).