Make OpenSplat easier to package for distros #82
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey, I'm trying to package OpenSplat for NixOS. OpenSplat is a fun tool and I'd like to see it get packaged in other distros, too.
One thing that distros dislike (some even forbid strictly) is using vendored dependencies, for various reasons, but mostly because it makes it difficult to track which versions of a project are used, and can make cleaning up security issues a lot more difficult.
The effect that the vendored dependencies achieve so far (making OpenSplat easy to build) can also be achieved by using CMake's FetchContent, which will download a fixed version of the dependencies (unless explicitly told not to, with
-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS
). This PR adds that. As an added benefit, this also documents exactly which versions of the dependencies are being used, and where they are taken from.PS: As a small aside, this also adds
install
calls for theopensplat
binary, so the normalcmake && make && make install
will work and automatic packaging scripts can do their thing.PPS: gsplat is heavily modified, right? I don't think it can be unvendored. It is, in effect, a fork.