Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Allow static linking #2

Merged
merged 3 commits into from
Mar 9, 2020
Merged

Allow static linking #2

merged 3 commits into from
Mar 9, 2020

Conversation

astraw
Copy link
Collaborator

@astraw astraw commented Mar 7, 2020

This will allow building the april tags library from source into a statically linked library. There are two advantages for my use case. First, there is no need to distribute and install the april tags dynamic library. Second, the cmake binary does not need to be installed at build time.

Copy link
Owner

@jerry73204 jerry73204 left a comment

Choose a reason for hiding this comment

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

Please take a look at this preview. Thanks.

build.rs Outdated Show resolved Hide resolved
build.rs Outdated Show resolved Hide resolved
build.rs Outdated Show resolved Hide resolved
@jerry73204
Copy link
Owner

It's nice to have the static linking feature. Furthermore, I think we should introduce another environment variable to hint the build method instead of CMAKE= and RAW= prefix. Think of an edge case that the directory name happens to be RAW=, though it would rarely happen, but it's for the sake of correctness.

Besides, I open an issue to document these magic env vars. I'll take care of it once it's merged.

@astraw
Copy link
Collaborator Author

astraw commented Mar 8, 2020

I updated the PR by creating the APRILTAG_SYS_METHOD env var which specifies the method used to compile and link the apriltag C library. I think this resolves your points above. I also started documenting the env vars in README.md.

@jerry73204
Copy link
Owner

jerry73204 commented Mar 9, 2020

Great! Let's merge.

Please click the merge button straight to merge with your name.

@astraw astraw merged commit e3cf22f into master Mar 9, 2020
@astraw astraw deleted the allow-static-link branch March 9, 2020 09:05
@astraw
Copy link
Collaborator Author

astraw commented Mar 9, 2020

Done, thanks for your review.

I have a couple other suggestions I will make PRs for in the next few days. After that, it would be great to make a new release, which I am happy to do.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants