Skip to content

Replace libjpeg-turbo with IJG's libjpeg#795

Merged
twostars merged 4 commits intomasterfrom
replace-libjpeg-turbo
Jan 25, 2026
Merged

Replace libjpeg-turbo with IJG's libjpeg#795
twostars merged 4 commits intomasterfrom
replace-libjpeg-turbo

Conversation

@twostars
Copy link
Collaborator

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.

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.
@twostars twostars merged commit 2611431 into master Jan 25, 2026
34 checks passed
@twostars twostars deleted the replace-libjpeg-turbo branch January 25, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants