jpbarrette / curlpp

C++ wrapper around libcURL
http://www.curlpp.org
1.68k stars 360 forks source link

Modernization of Install Logic #154

Closed Leon0402 closed 5 months ago

Leon0402 commented 1 year ago

This PR aims to not only install the library & inlcude headers, but also the target definition itself including required dependencies.

This allows Consumer Projects to do the following:

find_package(curlpp)

which will use findPackage in the recommended config mode and also ensures that dependencies such as curl are available.

or

add_subdirectory(curlpp) # git submodule, FetchContent, CPM, ...

And then in any case the target can be linked the same way. This will propagate all neded headers, libraries, dependencies, ...:

target_link_libraries(my_target PUBLIC curlpp::curlpp)
Leon0402 commented 5 months ago

@jpbarrette Could you please take a look. We are using my fork for one year now and would like to switch back to the master branch here.