joboccara/pipes

Add CMake support

TartanLlama opened this issue · 6 comments

It would be good to have CMake support so that users can easily add the library to their projects, tests can be built and run, and Vcpkg/Conan can support it. Ideally one could install the library through CMake and then use it like:

find_package(pipes REQUIRED)
target_link_libraries(my_target PRIVATE joboccara::pipes)

Indeed. I've tried to add CMake support with this fix. Does it look OK to you?

Ideally it should also have install targets. This blog post has a good example: http://dominikberner.ch/cmake-interface-lib/

Ok, nice blog post. I've added install instructions in this new fix.

Looks like it's missing the Config file part of the blog post, which is needed for users to get automatic access to the target after finding the package

Really not a CMake expert, but I think I did it with this new fix.

I tried to install with provided CMake and it seems to work.