pierotofy / OpenSplat

Production-grade 3D gaussian splatting with CPU/GPU support for Windows, Mac and Linux 🚀
https://antimatter15.com/splat/?url=https://splat.uav4geo.com/banana.splat
GNU Affero General Public License v3.0
933 stars 87 forks source link

Make OpenSplat easier to package for distros #82

Closed jcaesar closed 7 months ago

jcaesar commented 7 months ago

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 the opensplat binary, so the normal cmake && 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.

pierotofy commented 7 months ago

Thanks @jcaesar ! This looks great and should make it easier to upgrade libraries in the future 🙏

Yes gsplat is not really vendored, we've made some changes to it. At some point we'll probably rename it to avoid confusion.