Repository navigation
Add USE_LIBJPEG_TURBO option - #273
Merged
Merged
Conversation
Add an opt-in USE_LIBJPEG_TURBO CMake option that links an installed libjpeg-turbo through its libjpeg-compatible API instead of the bundled IJG libjpeg. Configure fails with a clear message if the found library is not libjpeg-turbo, or if BUILD_LIBJPEG is OFF. The installed package finds JPEG as a dependency, and the JPEG codec is tested independently of the lossless-transform helpers, which are unavailable with an external JPEG library. Add a libjpeg-turbo CI job (static and shared) that also installs and consumes the package, and document the option.
danoli3
force-pushed
the
feat/libjpeg-turbo-option
branch
from
November 9, 2026 10:22
7c7ce51 to
0061895
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds an opt-in
USE_LIBJPEG_TURBOoption (default OFF) that uses an installed libjpeg-turbo through its libjpeg-compatible API instead of the bundled IJG libjpeg.BUILD_LIBJPEG=OFF.find_dependency(JPEG)for external JPEG builds.transupp) are unavailable with an external JPEG library; the configure output says so and the README documents it.testJPEG.cppnow exercises the codec independently of those helpers.libjpeg-turboCI job (static and shared): build, test, install, and build/run the installed-package smoke consumer.Tested on macOS with Homebrew libjpeg-turbo 3.2.1: configure, build and 19/19 CTest tests pass, and
USE_LIBJPEG_TURBO=ONwithBUILD_LIBJPEG=OFFerrors as intended. On this machine a strayjpeglib.hin Mono.framework was found first, and the header check correctly rejected it untilJPEG_INCLUDE_DIRwas set, which is the case the check exists for. The installed-package smoke consumer links here only with theproject(... C CXX)change from #272; on current master that project is C-only. The Linux CI job is the first run of the new workflow.