blob: eae283b5170440025165270a47684bed81554adb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
const z = @import( "std" );
var b: *z.Build = undefined;
var target: z.Build.ResolvedTarget = undefined;
var optimize: z.builtin.OptimizeMode = undefined;
fn import( name: []const u8 ) z.Build.Module.Import {
const i = b.dependency( name, .{ .target = target, .optimize = optimize } );
return .{ .name = name, .module = i.module( name ) };
}
pub fn build( _b: *z.Build ) void {
b = _b;
target = b.standardTargetOptions( .{} );
optimize = b.standardOptimizeOption( .{} );
const exe = b.addExecutable( .{
.name = "moneyboard-backend",
.root_module = b.createModule( .{
.root_source_file = b.path( "src/main.zig" ),
.target = target,
.optimize = optimize,
.imports = &.{
import( "sqlite" ),
},
} ),
} );
b.installArtifact( exe );
const run_step = b.step( "run", "Run the app" );
const run_cmd = b.addRunArtifact( exe );
run_step.dependOn( &run_cmd.step );
run_cmd.step.dependOn( b.getInstallStep() );
if( b.args ) |args| {
run_cmd.addArgs( args );
}
}
|