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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user