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

Fixed issues when including Polaris in an external CMake project. #54

Merged
merged 11 commits into from
Aug 16, 2023

Conversation

adamshapiro0
Copy link
Contributor

New Features

  • Added examples of including Polaris C and C++ libraries in external CMake projects

Changes

  • Renamed BUILD_EXAMPLES option to POLARIS_BUILD_EXAMPLES
  • Updated minimum requirement to CMake 3.6 (3.5 is deprecated and no longer supported)
  • Corrected CMake README instructions, and updated to use FetchContent_MakeAvailable()

Fixes

  • Fixed missing target_include_directories() calls to add source directories to include search path
  • Fixed CMAKE_MODULE_PATH when building out of tree

…es().

target_include_directories() has the benefit of attaching the include directory
to the public API of the library. That way, when someone adds the library as a
target_link_libraries() dependency to their own project, it automatically adds
the Polaris client source directory to the include path.
@adamshapiro0 adamshapiro0 self-assigned this Aug 16, 2023
@adamshapiro0
Copy link
Contributor Author

@anathan FYI. Also heads up that the Bazel builds are still broken because of an issue with boring-ssl. I believe you were working on a fix for that?

Keeping BUILD_EXAMPLES support for backwards compatibilty for now.
When Polaris client is included in an external project, CMAKE_SOURCE_DIR will
reflect the root directory of the external project.
CMake 3.5 and earlier are deprecated and CMake plans to remove compatibility for
them in a future update (it has not been removed as of 3.27). 3.16 was first
released in 2019, so it should be old enough now that it's a reasonable choice
for a minimum requirement.
We need some changes from this branch to use FetchContent, so we can't reference
the 1.3.1 release until it has been tagged.
@anathan
Copy link
Member

anathan commented Aug 16, 2023

@anathan FYI. Also heads up that the Bazel builds are still broken because of an issue with boring-ssl. I believe you were working on a fix for that?

I'll open an issue to track that.

Copy link
Contributor

@axlan axlan left a comment

Choose a reason for hiding this comment

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

LGTM

@adamshapiro0 adamshapiro0 merged commit 41185fa into master Aug 16, 2023
9 checks passed
@adamshapiro0 adamshapiro0 deleted the cmake-build branch August 16, 2023 16:16
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.

3 participants