[cmake-developers] Proposed Feature: automatic search prefixes forfind modules

Nagy-Egri Máté Ferenc csiga.biga at aol.com
Tue May 23 07:32:47 EDT 2017


I think it’s a good idea.

Having PackageConfig.cmake files for all projects would be better, but unfortunately, many projects don’t support CMake to that extent (or to any extent to be precise). I still consume SFML like this, even though the project itself builds with CMake, so they could’ve really cook some package config files in the past 6 years, but no. Qt most notably is project that builds with a 3-rd party tool (qmake), but the Windows installer actually installs proper package config files (kudos). GLM when built from github even registers the install into the user registry (kudos**2).

Feladó: Chuck Atkins
Elküldve: 2017. május 3., szerda 20:12
Címzett: CMake Developers
Tárgy: [cmake-developers] Proposed Feature: automatic search prefixes forfind modules

Brad and I discussed this a few years ago but nothing really came of it.  Working through several find modules today, I saw many common patterns for this and realized it should be pretty easy to implement, so here it is:
Allow the variables ENV{PackageName_ROOT} and PackageName_ROOT to be used as initial search prefixes for al find_{file,path,library,program} commands executed from within a find module.

https://gitlab.kitware.com/cmake/cmake/merge_requests/796
Specifying the search prefix is a very common pattern, especially when the utility is not setup in your path, and prevents the need to explicitly set the location of all the various headers and libraries for a module when you can just specify a prefix to use.


Thoughts? Good Idea?  Bad idea?  Good, but do it differently?  Undecided?
Thanks
- Chuck

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20170523/a19bbafd/attachment.html>


More information about the cmake-developers mailing list