Skip to content
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

Use external libsquish if found #2451

Merged
merged 1 commit into from
Jan 7, 2020

Commits on Jan 3, 2020

  1. Use external libsquish if found

    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).
    lgritz committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    efbdb6a View commit details
    Browse the repository at this point in the history