[CMake] anybody crosscompiling and using pkg_config ?

Hendrik Sattler post at hendrik-sattler.de
Sat Jul 19 06:04:28 EDT 2008


Am Samstag, 19. Juli 2008 10:29:56 schrieb Enrico Scholz:
> Alexander Neundorf <a.neundorf-work at gmx.net>
>
> writes:
> > when crosscompiling, pkg_config shouldn't find packages for the host
> > system, but for the target system.
>
> Host pkgconfig path will *always* be tried by pkgcofig; regardless of
> setting of $PKG_CONFIG_PATH.

If you do set PKG_CONFIG_LIBDIR (_not_ PKG_CONFIG_PATH), then the host 
pkgconfig tool will work correctly. Since it only reads text files, there is 
simply no need to have a target-specific pkconfig.

You can setup pkgconfig in the toolchain file as a work-around, though. You 
have to do that for standard include paths (/include, /usr/include) anyway.

HS


More information about the CMake mailing list