Adding possibility to install library and find_package it #132
+95
−28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dear @whoshuu,
I'm proposing you this small addition to your cmake files in order to allow seamless installation, find_packageing and package generation of CPR.
This is really useful when building systems depending on the library, for example we build IoT devices based on linux, and as we have multiple apps depending on CPR, we would like to compile it and install it once in our development sysroot and depend on it from our different application.
This also ease creating a package with CPack, that you can then distribute to developer as precompiled development package. Or even integrating your library in the CMake Package Manager
For example, thanks to this I can now install and use cpr this way in my project :
Thank your for developing this wrapper, I have 2 colleagues who really appreciate the simplicity of the API.
I would be happy to know what do you think from this patch. 😄