Hi All,
So from a previous threads, we were discussing pkgconfig and cmake
interoperability. One issue with using pkgconfig currently, is that the results
are completely flat. This is due to using the CLI to retrieve pkgconfig, which
gives the user all the flags from every transitive package. This is great from
a user perspective, but from cmake perspective not so because may already being
using one of the transitive dependencies.
So instead of using the CLI, there is a library implementation of pkgconfig
called pkgconf:
https://github.com/pkgconf/pkgconf <https://github.com/pkgconf/pkgconf>
http://pkgconf.readthedocs.io/en/latest/
<http://pkgconf.readthedocs.io/en/latest/>
CMake could use pkgconf internally, and then use functions like
`pkgconf_pkg_traverse` to iterate over the transitive dependencies. We could
use variable in the .pc files like `cmake_package` to know which cmake package
the dependency belongs to or perhaps `cmake_target` to set the name of the
cmake imported target.
Daniel Pfeiffer proposed supporting pkgconfig by extending `find_package`, like
this:
find_package(zlib CONF)
And this would look up zlib using pkgconfig. The advantage of this, is that the
transitive dependencies can be specified in the same manner as
`find_dependency(zlib CONF)`.
Paul
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers