> On Jun 13, 2018, at 7:54 AM, Brad King <brad.k...@kitware.com> wrote: > > On 06/12/2018 12:11 PM, Paul Fultz II via cmake-developers wrote: >> https://github.com/pkgconf/pkgconf >> >> CMake could use pkgconf internally > > The license looks MIT-like. > > Please confirm that it is at least BSD-3 compatible.
I am not lawyer, but it seems to be compatible. > >> find_package(zlib CONF) >> >> And this would look up zlib using pkgconfig > > An important distinction is that `find_package` is meant for whole > packages that may contain multiple libraries and components, while > IIUC a `.pc` file is equivalent to a single CMake target. We'll > need a way to reconcile that. Does pkgconfig have conventions for > meta-packages that cover multiple components? You can just create a .pc file that adds each component in the requires. Since, we trace the dependencies, the user can use just one of the components targets, or use the package’s target which will include all components. We could have the `find_package` component clause select one of the requirements: find_package(foo CONF COMPONENTS bar) But I dont think this really makes sense as the user could just do: find_package(bar CONF) > > Also, how should version matching work? This is different than cmake’s. Since this is a different mode for `find_package` we should probably support the version constraints of pkgconfig: find_package(zlib CONF VERSION > 1.0) Although since pkgconfig has a more sophisticated mechanism to resolve packages(through the ‘replaces’ and ‘conflicts’ fields), we may want to have a way to query several packages at once, or even use previous found version as a constraint as well. -- 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