Skip to content
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

feat/build: cmake packages #10

Merged
merged 26 commits into from
Dec 4, 2023
Merged

feat/build: cmake packages #10

merged 26 commits into from
Dec 4, 2023

Conversation

G4Vi
Copy link
Contributor

@G4Vi G4Vi commented Dec 2, 2023

This applies a somewhat more modern approach to cmake dependency handling. The next step after this is revamping the README with a Getting Started guide.

  • extism and jsoncpp are now always linked via cmake targets instead of sometimes doing a filename search of libraries, whether they are included with add_subdirectory, find_package or FetchContent.
  • Removed submodules. Projects wishing to do an in-tree build should include extism, jsoncpp, and cpp-sdk all in the same directory. Including them within cpp-sdk made having a flat dependency tree impossible.
  • Added building and making available extism and jsoncpp dependencies with FetchContent. If the build is not an in-tree build and find_package fails, they are downloaded and built.
  • Added extism-cpp CMake package to more easily integrate the cpp-sdk with non-intree build projects.
  • GTest / googletest is no longer a mandatory dependency. It's now included via find_package and the test target is not built if it's not found.
  • Remove hacks for including headers and linking libraries. cmake and pkg-config may be used to get the right flags.
  • Add .clang-format, it appears to be the style aready used.
  • ci now fetches libextism with a github token to avoid rate limiting

@G4Vi G4Vi marked this pull request as ready for review December 4, 2023 23:32
@G4Vi G4Vi requested a review from zshipko December 4, 2023 23:32
Copy link
Contributor

@zshipko zshipko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@G4Vi G4Vi merged commit c69036d into main Dec 4, 2023
2 checks passed
@nilslice nilslice deleted the cmake-packages branch December 5, 2023 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants