meson: detects qmake from build system when cross compiling
When cross compiling, this happened:
Found qmake: /usr/bin/qmake (5.9.5)
Run-time dependency qt5 (modules: Core, Gui, Qml, Quick) found: YES 5.9.5 (qmake)
Program moc-qt5 found: NO
Program moc found: YES (/usr/bin/moc)
Run-time dependency qt5core found: NO (tried pkgconfig and cmake)
Program qmake-qt5 found: NO
Program qmake found: YES (/usr/bin/qmake)
Has header "qpa/qplatformnativeinterface.h" : NO
Detecting Qt5 tools
Found qmake: /usr/bin/qmake (5.9.5)
moc: YES (/usr/lib/qt5/bin/moc, 5.9.5)
uic: YES (/usr/lib/qt5/bin/uic, 5.9.5)
rcc: YES (/usr/lib/qt5/bin/rcc, 5.9.5)
lrelease: YES (/usr/lib/qt5/bin/lrelease, 5.9.5)
This is bogus, /usr/bin/qmake is not suitable for the target system. Later on the build died like this:
arm-linux-gnueabihf-g++ -Iext/qt/2759a16@@gstqmlgl@sha -Iext/qt -I../../gst-plugins-good/ext/qt -I. -I../../gst-plugins-good/ -I../../gst-plugins-good/gst-libs -I/home/al/Source/rpi-ramdisk/sysroot/sysroot/usr/include/glib-2.0 -I/home/al/Source/rpi-ramdisk/sysroot/sysroot/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/home/al/Source/rpi-ramdisk/sysroot/sysroot/opt/gstreamer/include/gstreamer-1.0 -I/home/al/Source/rpi-ramdisk/sysroot/sysroot/usr/include/orc-0.4 -I/home/al/Source/rpi-ramdisk/sysroot/sysroot/opt/gstreamer/lib/gstreamer-1.0/include -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtQuick -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++11 -O2 -g -Wmissing-declarations -Wredundant-decls -Wwrite-strings -Winit-self -Wmissing-include-dirs -Wno-multichar -Wvla -Wpointer-arith --sysroot=/home/al/Source/rpi-ramdisk/sysroot/sysroot -fPIC -DQT_CORE_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_QUICK_LIB -pthread -DHAVE_CONFIG_H -DHAVE_QT_EGLFS -MD -MQ 'ext/qt/2759a16@@gstqmlgl@sha/gstqsgtexture.cc.o' -MF 'ext/qt/2759a16@@gstqmlgl@sha/gstqsgtexture.cc.o.d' -o 'ext/qt/2759a16@@gstqmlgl@sha/gstqsgtexture.cc.o' -c ../../gst-plugins-good/ext/qt/gstqsgtexture.cc
In file included from ../../gst-plugins-good/ext/qt/gstqsgtexture.cc:30:
/home/al/Source/rpi-ramdisk/sysroot/sysroot/opt/gstreamer/include/gstreamer-1.0/gst/gl/gstglfuncs.h:46:13: fatal error: GLES2/gl2.h: No such file or directory
# include <GLES2/gl2.h>
^~~~~~~~~~~~~
compilation terminated.
Note the large number of x86_64 directories passed to the arm compiler.
Qt is optional in my environment - there may or may not be a qmake for the target. If there is, it won't be on the path, so I will need to specify its location manually. If there isn't then I currently have to explicitly disable qt to prevent this error from happening.