Skip to content

lateleite/xmp-on-zig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XMP on Zig

This repository wraps the upstream Extended Module Player library source code with Zig's build system.

Zig 0.15.2 is required.

Installing as a build.zig.zon package

Run in your Zig project:

zig fetch --save-exact=xmp git+https://github.com/lateleite/xmp-on-zig.git

Then 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.

License

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.

About

XMP module/tracker rendering library wrapped with Zig's build system

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages