I am using arm-linux-gnueabihf-gcc compiler toolchain for RaspberryPi from http://gnutoolchains.com/raspberry/
It is based on MinGW (as I understood from its documentation). It is installed with sysroot copy from Raspbian with libraries and headers.
Question: How to setup a sysroot folder (e.g. using env variable) for this toolset?
For example, when doing flags.make contains:
C_INCLUDES = -I/opt/vc/include
This folder is accessible at C:\SysGC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include.
Toolset binaries are installed in C:\SysGC\raspberry\arm-linux-gnueabihf\bin\ (accessible via %PATH%).
But compiler and linker doesnt look for libraries and headers in that sysroot folder.
I can still pass full windows host path for cmake but it will be more elegant and convenient to set it up once and keep original cmake configuration.
I tried do something like
set SYSROOT=C:\SysGC\raspberry\arm-linux-gnueabihf\sysroot
but it does not work. gcc compilers has option --sysroot but that does not seem to be passed correctly via cmake/make toolchain.
Any advice, please?