[CMake] simple find_package example

Randy Heiland randy.heiland at gmail.com
Tue Aug 7 08:48:26 EDT 2018


Hmm, well if that's the case, how does one generate the HelloConfig.cmake
file?

Although, for my particular situation, my question about wanting to
generate a "Find" file still remains, I think. I have a library which is,
potentially, useful to several projects. I assume there's some sort of
"Find" template for any such lib, i.e., a project needs to be able to
locate a lib (static or dynamic) and headers, cross-platform.

thanks, Randy

On Mon, Aug 6, 2018 at 4:09 PM, Alexander Neundorf <neundorf at kde.org> wrote:

> On 2018 M08 2, Thu 10:01:39 CEST Randy Heiland wrote:
> > Hi,
> >
> > I'd like to figure out how to modify the simple "hello" demo (
> > https://cmake.org/examples/) so that the Hello project is a library
> with an
> > accompanying FindHello.cmake and then the Demo project uses that
> > information and "find_package" to discover/use it.
> >
> > Hopefully that makes sense. Basically, I'm looking for a simple tutorial
> on
> > how I can make my library easily accessible to a CMake project.
>
> for that, you don't want a FindHello.cmake (which would typically be
> shipped
> either by cmake or by the consuming application), instead you want to
> generate
> and install a HelloConfig.cmake file.
>
> Alex
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180807/4be6f931/attachment-0001.html>


More information about the CMake mailing list