Build fails with "...usr/include/qt5/QtGui/qopengl.h:99:26: fatal error: GLES2/gl2.h: No such file or directory"

I am trying to build Qwt-6.1 for armv7at2hf-vfp-neon-angstrom-linux-gnueabi using the cross-toolchain.

On my build host I did:

. /home/oe/oecore-x86_64/environment-setup-armv7at2hf-vfp-neon-angstrom-linux-gnueabi
cd qwt-6.1/
qmake qwt.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
make

It fails with the error below:

In file included from ../../oecore-x86_64/sysroots/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/usr/include/qt5/QtOpenGL/qgl.h:39:0,
                 from qwt_plot_glcanvas.h:15,
                 from qwt_plot_glcanvas.cpp:10:
../../oecore-x86_64/sysroots/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/usr/include/qt5/QtGui/qopengl.h:99:26: fatal error: GLES2/gl2.h: No such file or directory
compilation terminated.
Makefile:12365: recipe for target 'obj/qwt_plot_glcanvas.o' failed
make[1]: *** [obj/qwt_plot_glcanvas.o] Error 1
make[1]: Leaving directory '/home/oe/qwt-6.1/src'
Makefile:45: recipe for target 'sub-src-make_first-ordered' failed
make: *** [sub-src-make_first-ordered] Error 2

As you can see the missing file GLES2/gl2.h is referred to by ../../oecore-x86_64/sysroots/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/usr/include/qt5/QtGui/qopengl.h which I installed as described here.

And the file is there:

$ find oecore-x86_64/sysroots/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/ -iname gl2.h

oecore-x86_64/sysroots/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/usr/include/GLES2/gl2.h
oecore-x86_64/sysroots/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/usr/lib/qt5/mkspecs/common/ios/GLES2/gl2.h

Why does the compiler not find the header?

Seems like my invocation of qmake was not correct. When I use the commands below it builds:

. /home/oe/oecore-x86_64/environment-setup-armv7at2hf-vfp-neon-angstrom-linux-gnueabi
cd qwt-6.1/
qmake qwt.pro
make all