google/fruit

consume fruit from CMake with package config

rizsotto opened this issue · 5 comments

Hey Guys,

thanks for making this project. Looks exactly what I was looking for!

I'm wondering that how the consumer of this library shall integrate into the build system. I see a lot of hooks in the CMake files for Conan. (I'm not planing to use Conan.)

Other google projects were providing config packages for CMake. (googletest, grpc) I'm wondering if this project could follow the pattern too? Or a pkg-config file would be also nice if the CMake solution seems to be less portable. What do you guys think?

Unless you have more specific needs I'd install Fruit on your system first, then include the FindFruit file in your project to compile against it.
https://github.com/google/fruit/blob/master/cmake-modules/FindFruit.cmake

I would recommend to not build Fruit during the build of your project if possible.

Oh, and see this for how to install if you didn't see this before:
https://github.com/google/fruit/wiki/install

Thanks for the quick response. I found the FindFruit.cmake file inspiring. It does not work without a few fixes, but it's solvable. (Do you want a PR on that?)

#116 is my version for this module. Thanks for your help.