-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[libigl] Always install as header-only library #14888
[libigl] Always install as header-only library #14888
Conversation
The PR shows failure for another port. |
Maybe we should add an new feature |
870723f
to
d7184f8
Compare
Added header-only as a feature |
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.
The "header-only" feature doesn't comply with our guidelines for features, namely, that they do not provide "alternative" selections. See https://github.com/microsoft/vcpkg/blob/master/docs/maintainers/maintainer-guide.md#do-not-use-features-to-control-alternatives-in-published-interfaces
Crucially, any downstream consumer who is passing -ligl (or similar to link the static lib) would be broken by turning on this "feature".
It might be acceptable to make such a chance unconditional if the current users of the port think that makes sense.
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.
Since the comments in the upstream project indicate that it is a "header only library", I think the right way forward is to always just do that.
With this change, LGTM!
In #14376, triplet *-windows-dynamic version was updated to rely on the library as header-only while leaving the *-static triplet intact. However, the static library archive still suffers from the same reported issues: huge size and not all combination of explicitly instantiated templates exist. This PR forces installs of libigl as header-only library for both static and dynamic triplets. (Particularly useful for vcpkg on linux where the default triplet has static linkage by default)
Let me know if this PR is an agreeable change on your side.