[cmake-developers] CMake "find_package" command on a package that is not installed is unexpectedly successful

Timothy Wrona tjwrona1992 at gmail.com
Tue Feb 5 15:15:54 EST 2019


Thank you! I didn't know it would make a registry entry, that was the
missing link!

On Tue, Feb 5, 2019 at 2:46 PM Brad King <brad.king at kitware.com> wrote:

> On 2/5/19 2:37 PM, Timothy Wrona wrote:
> > Can anyone explain to me how "find_package" is able to find the Eigen
> libraries
> > even though they are just pasted into some arbitrary location that I
> never told
> > the example project about?
>
> Eigen uses the CMake package registry feature:
>
>
> https://bitbucket.org/eigen/eigen/src/a3be57987f/CMakeLists.txt?at=default&fileviewer=file-view-default#CMakeLists.txt-602:604
>
> See docs here:
>
>
> https://cmake.org/cmake/help/v3.13/manual/cmake-packages.7.html#package-registry
>
> and step 6 of the find_package search procedure:
>
>
> https://cmake.org/cmake/help/v3.13/command/find_package.html#search-procedure
>
> -Brad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake-developers/attachments/20190205/0d128c12/attachment.html>


More information about the cmake-developers mailing list