-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cmake package config #3722
Add cmake package config #3722
Conversation
455ec50
to
b120470
Compare
So the CMake goo itself is fine (well I haven't reviewed it but no objections in principle to shipping something like this) but I'd rather the test of the CMake integration not go in |
Sure, I'll move it. Then this answers the question where to run the tests (with the examples). |
Shared linking works fine already, static is a bit more complicated to set up, but I would like to give it a try. I'd also like to ask the CMake devs for a review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A pass over this was requested on Slack. Take as you see fit.
0cff302
to
aeddb13
Compare
@mathstuf Thanks a lot for your review! Your hints were insightful and made this a much better package config for sure. Regarding relocatablility: We now defined the locations of includes and libraries relative to the Maybe @thesamesam has an opinion or insight about it as well? 😄 |
aeddb13
to
5065303
Compare
@randombit I think this is ready now, so I removed the draft description. I also added a docstring and removed one leftover |
This generates botan-config-version.cmake and botan-config.cmake files and ships them with the library during the 'install' build step. These files facilitate the consumption of the library using CMake's find_package() in downstream applications. Co-Authored-By: René Meusel <rene.meusel@rohde-schwarz.com>
358197a
to
3a052c4
Compare
Squashed and rebased now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not review the CMake configs, changes to Python look fine
Adds a CMake package configuration for the library, so users of Botan using CMake to link against Botan don't need to invoke pkg-config or write a CMake find module (rnpgp/rnp#2121). Unlike suggested in #3490, we don't write a find module, as package configuration files now seem to be the recommended way. The package configuration files are installed with Botan and can then be used as follows:
Also adds tests to the CI. Tests are provided in
src/scripts/ci/cmake_tests
using an example CMake project.Closes #3490.