add zig packaging
This commit is contained in:
		
							parent
							
								
									977c5273f0
								
							
						
					
					
						commit
						e0657afa53
					
				
					 2 changed files with 18 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -15,6 +15,12 @@ pub fn build(b: *std.Build) void {
 | 
			
		|||
    // set a preferred release mode, allowing the user to decide how to optimize.
 | 
			
		||||
    const optimize = b.standardOptimizeOption(.{});
 | 
			
		||||
 | 
			
		||||
    const raylib_dep = b.dependency("raylib", .{
 | 
			
		||||
        // These are the arguments to the dependency. It expects a target and optimization level.
 | 
			
		||||
        .target = target,
 | 
			
		||||
        .optimize = optimize,
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    const exe = b.addExecutable(.{
 | 
			
		||||
        .name = "zig",
 | 
			
		||||
        // In this case the main source file is merely a path, however, in more
 | 
			
		||||
| 
						 | 
				
			
			@ -24,6 +30,8 @@ pub fn build(b: *std.Build) void {
 | 
			
		|||
        .optimize = optimize,
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    exe.addModule(raylib_dep.module("some_mod"));
 | 
			
		||||
 | 
			
		||||
    // This declares intent for the executable to be installed into the
 | 
			
		||||
    // standard location when the user invokes the "install" step (the default
 | 
			
		||||
    // step when running `zig build`).
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										10
									
								
								zig/build.zig.zon
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								zig/build.zig.zon
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,10 @@
 | 
			
		|||
.{
 | 
			
		||||
    .name = "fabapp",
 | 
			
		||||
    .version = "0.1.0",
 | 
			
		||||
    .dependencies = .{
 | 
			
		||||
        .raylib = .{
 | 
			
		||||
            .url = "https://github.com/raysan5/raylib/archive/refs/tags/4.5.0.tar.gz",
 | 
			
		||||
            .hash = "1220ff8eeb8c51ed28ef7d1224ba2968e00e689774dd6316cb25347a44844dbf210f",
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue