Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Latest commit

 

History

History
28 lines (20 loc) · 905 Bytes

get-started.md

File metadata and controls

28 lines (20 loc) · 905 Bytes

How to compile?

Clone this github repo or download the newest release and copy the "libbuild.zig" file to your project for zig's build system

After that all you need to do put this code in build.zig file:

const Builder = @import("std").build.Builder;
const lib = @import("libbuild.zig");

pub fn build(b: *Builder) void {
	const target = b.standardTargetOptions(.{});
	const mode = b.standardReleaseOptions();
    
  lib.strip = b.option(bool, "strip", "Strip the exe?") orelse false;

  // Note: the 'enginepath' should be a relative path!
  const exe = lib.setup(b, target, app_name, path_to_main_src, enginepath); 
  exe.setOutputDir("build");
  exe.setBuildMode(mode);
  exe.install();
}

zig build and done!

More on examples