compression project.cpp fix

This commit is contained in:
Jorijn van der Graaf 2026-05-12 00:12:05 +02:00
commit 93e553fba5

View file

@ -41,7 +41,11 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
// Vendored GDeflate (Apache-2.0, Microsoft DirectStorage reference) + // Vendored GDeflate (Apache-2.0, Microsoft DirectStorage reference) +
// libdeflate (MIT, NVIDIA fork). The C++ wrappers live inline in the // libdeflate (MIT, NVIDIA fork). The C++ wrappers live inline in the
// Compression module impl; libdeflate's .c sources are compiled here. // Compression module impl; libdeflate's .c sources are compiled here.
cfg.compileFlags.push_back("-Ilib/gdeflate/libdeflate"); // Absolute path: when Crafter.Asset is consumed as a dep, the build runs
// clang from the consumer's cwd, and a relative -I would silently fall
// through to /usr/include and pick up a system libdeflate of a different
// ABI (1.25 dropped LIBDEFLATEEXPORT) instead of the vendored 1.8 fork.
cfg.compileFlags.push_back(std::format("-I{}", fs::absolute("lib/gdeflate/libdeflate").string()));
const std::array<fs::path, 12> libdeflateSources = { const std::array<fs::path, 12> libdeflateSources = {
"lib/gdeflate/libdeflate/lib/adler32", "lib/gdeflate/libdeflate/lib/adler32",
"lib/gdeflate/libdeflate/lib/crc32", "lib/gdeflate/libdeflate/lib/crc32",