diff --git a/project.cpp b/project.cpp index fdb8efa..5efd81f 100644 --- a/project.cpp +++ b/project.cpp @@ -41,7 +41,11 @@ extern "C" Configuration CrafterBuildProject(std::span a // Vendored GDeflate (Apache-2.0, Microsoft DirectStorage reference) + // libdeflate (MIT, NVIDIA fork). The C++ wrappers live inline in the // 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 libdeflateSources = { "lib/gdeflate/libdeflate/lib/adler32", "lib/gdeflate/libdeflate/lib/crc32",