graphics: remove libjpeg from XP builds, fetch at build time (#874)

Replaces the vendored `external/libjpeg-turbo` tree (191 files) with the
`mingw-w64-libjpeg-turbo` AUR package, already built into the Docker
deps image.

The WinXP toolchains set `CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY`
against their own sysroot, so they cannot see AUR mingw packages. Those
targets now build without JPEG support: `jpeg_encoder::encode` compiles
to a stub returning `false`, which callers already treat as "no frame
available". The practical effect is that `capture.get_jpg` over the API
is unavailable on WinXP builds; every other target is unchanged.

CMake names `libjpeg.a` outright, since the package also ships an import
library and linking that would add a runtime DLL dependency.
This commit is contained in:
bicarus
2026-08-18 08:57:18 -07:00
committed by GitHub
parent 0f4ab63101
commit 7c50fcc79e
194 changed files with 44 additions and 82635 deletions
@@ -1,5 +1,7 @@
#include "jpeg_encoder.h"
#ifdef SPICE_JPEG
#include <csetjmp>
#include <cstdio>
@@ -138,3 +140,17 @@ bool encode(
return true;
}
}
#else // SPICE_JPEG
namespace jpeg_encoder {
// builds without libjpeg-turbo (the WinXP toolchains) simply cannot encode;
// callers already treat a false return as "no frame available"
bool encode(std::vector<uint8_t> &out, const uint8_t *, int, int, int) {
out.clear();
return false;
}
}
#endif // SPICE_JPEG