Ask Your Question

Revision history [back]

I successfully got it to detect by using the normal pkg-config. You have to set "PKG_CONFIG_SYSROOT_DIR=/path/to/your/arm/sysroot" and "PKG_CONFIG_PATH=/path/to/arm/sysroot/usr/lib/pkgconfig:/path/to/arm/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig:/path/to/arm/sysroot/usr/share/pkgconfig"

I successfully got it to detect by using the normal pkg-config. You have to set "PKG_CONFIG_SYSROOT_DIR=/path/to/your/arm/sysroot" and "PKG_CONFIG_PATH=/path/to/arm/sysroot/usr/lib/pkgconfig:/path/to/arm/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig:/path/to/arm/sysroot/usr/share/pkgconfig"

These are environment variables, not cmake variables, so use "export variable=value" in terminal, or if you want to put it in your toolchain file, use "set(ENV{PKG_CONFIG_SYSROOT_DIR} /path/to/arm/sysroot)" somewhere at the beginning of the toolchain file.