Replace libjpeg-turbo with IJG's libjpeg#795
Merged
Conversation
libjpeg-turbo is a bad fit as a CMake dependency. It requires the use of ExternalProject_Add() which creates complications, particularly when swapping the compiler (e.g. for mingw), not to mention as-is, it ends up having to fetch at build time rather than configure time like every other dependency. As we only use this for screenshots (KSCs) (i.e. its use is limited to the KscViewer and the very rare instance of pressing the in-game screenshot button), the performance benefit of libjpeg-turbo is fairly moot. For simplicity, we go back to the basic IJG implementation (with unofficially added CMake config). This allows us to use the dependency directly and consistently with the others, and there's no concern with it using a different compiler unintentionally.
Executables would also be off, but we'll just ensure it anyway.
kenner2
approved these changes
Jan 25, 2026
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.
libjpeg-turbo is a bad fit as a CMake dependency.
It requires the use of ExternalProject_Add() which creates complications, particularly when swapping the compiler (e.g. for mingw), not to mention as-is, it ends up having to fetch at build time rather than configure time like every other dependency.
As we only use this for screenshots (KSCs) (i.e. its use is limited to the KscViewer and the very rare instance of pressing the in-game screenshot button), the performance benefit of libjpeg-turbo is fairly moot.
For simplicity, we go back to the basic IJG implementation (with unofficially added CMake config).
This allows us to use the dependency directly and consistently with the others, and there's no concern with it using a different compiler unintentionally.