assimp / assimp

The official Open-Asset-Importer-Library Repository. Loads 40+ 3D-file-formats into one unified and clean data structure.
https://www.assimp.org
Other
10.39k stars 2.83k forks source link

CMake: Allow linking draco statically if ASSIMP_BUILD_DRACO_STATIC is set. #5535

Closed alexrp closed 1 month ago

alexrp commented 1 month ago

In Silk.NET we're packaging Assimp as a native dependency. We'd like to enable Draco in our Assimp build but would also like to avoid having to ship the extra shared library. This patch adds an option ASSIMP_BUILD_DRACO_STATIC which allows building and linking Draco statically into Assimp.

This only works when using the bundled Draco since there doesn't seem to be an obvious way to make it work with find_package().

I'm only able to test this on Linux. Hopefully it just works on Windows and macOS in CI...

kimkulling commented 1 month ago

Merged, thanks a lot for your contribution.