Ask Your Question

iwalpola's profile - activity

2017-02-03 12:48:30 -0600 received badge  Editor (source)
2017-02-03 12:47:06 -0600 answered a question opencv-2.4.10 cross compilation with GTK+2.0 in ubuntu 14.04 (64-bit) for raspberry pi

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.