This repository wraps the upstream Extended Module Player library source code with Zig's build system.
Zig 0.15.2 is required.
Run in your Zig project:
zig fetch --save-exact=xmp git+https://github.com/lateleite/xmp-on-zig.gitThen in your build.zig file:
pub fn build(b: *std.Build) !void {
// ...
// Add a reference to the package you've just fetched...
const dep_xmp = b.dependency("xmp", .{
.target = target,
.optimize = optimize,
// force linking mode (default is static)
// .@"link-mode" = .dynamic,
// force enable or disable Position Independent Code (PIC)
// .pic = true,
// disable archive depackers support (they're enabled by default)
// .@"enable-depackers" = false,
// disable ProWizard format loaders (they're enabled by default)
// .@"enable-prowizard" = false,
});
const lib_xmp = dep_xmp.artifact("xmp");
// ...then link the library to your module
your_module.linkLibrary(lib_xmp);
// ...
}After that, you may use XMP's header files in your module.
All (build) code here is released to public domain or under the BSD Zero Clause license, choose whichever you prefer.
You may find XMP's license at https://github.com/libxmp/libxmp/blob/301a9c0ae9dcdde7dd5ec336ad497e228fb52568/README.