Hi all, as part of our internal software build system, we make heavy use of pkg-config .pc files, and found very useful to parametrize compile options and paths using pkg-config's "--define-variable" command line option (e.g.: use a build "chroot" or not).
So far, I've been unable to find a satisfying cross-platform way of doing
this, using CMake, so I modified FindPkgConfig.cmake to allow custom options
to be used when calling pkg-config.
I'm not a long time CMake user and it may not be the best CMake way to
achieve this.
Here's how to use it:
---
include(FindPkgConfig)
set(PKG_CONFIG_CUSTOM_OPTIONS
"--define-variable=mypcvar=/somewhere/on/your/disk")
pkg_check_modules(MYMODULE REQUIRED mymodule)
---
A patch against CMake 2.6.3 is attached, in the hope it will be useful to
someone else.
--
Remy Chibois
pkgconfig-options.patch.gz
Description: GNU Zip compressed data
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
