Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use external libsquish if found (#2451)
This patch checks for libsquish already on the system, and if found, uses it. If not found on the system, it falls back on the embedded version in src/dds.imageio/squish. CMake option USE_EMBEDDED_LIBSQUISH can be used to force use of the embedded version even if found on the system. Background: Our DDS support (by Leszek Godlewski in 2010, as a GSoC student) relies on an embedded copy of libsquish (MIT license) for DXT compression. Embedding was a reasonable choice at the time, but in 2020 it's easily installed an Ubuntu, Homebrew, Vcpkg. Furthermore, it's also a Debian package and runs up against their rule that we should never embed code that is available from other Debian packages that can be used as dependencies. This is all I want to do in this patch -- comply with Debian rules, and also reduce OIIO build time by relying on a prebuilt libsquish if found on the system. This won't break anybody's builds at this time if they don't have libsquish already installed, and should be safe to backport to 2.1 for Debian compliance. But in the future, we might make it a purely external dependency -- expect it on the system, and if not found, simply disable DDS support (like we do with many other optional dependency such as libwebp or libheif).
- Loading branch information