-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.zig
More file actions
45 lines (37 loc) · 1.11 KB
/
Copy pathbuild.zig
File metadata and controls
45 lines (37 loc) · 1.11 KB
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
41
42
43
44
45
const std = @import("std");
const SOURCE_FILES = [_][]const u8{
"./src/main.cpp",
"./src/search.cpp",
"./src/scroll.cpp",
"./src/users.cpp",
"./src/packages_index_details.cpp",
"./src/programs_index_details.cpp",
"./src/helper_lib/helper_lib.cpp",
"./src/package_detial.cpp",
};
const FLAGS = [_][]const u8{
"-std=c++23",
};
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const root_module = b.createModule(.{
.target = target,
.optimize = optimize,
.link_libcpp = true,
});
root_module.addCSourceFiles(.{
.files = &SOURCE_FILES,
.flags = &FLAGS,
.language = .cpp,
});
root_module.addIncludePath(b.path("./include"));
root_module.addIncludePath(.{ .cwd_relative = "/opt/homebrew/include" });
root_module.addLibraryPath(b.path("./include"));
root_module.linkSystemLibrary("sqlite3", .{});
const exe = b.addExecutable(.{
.name = "app",
.root_module = root_module,
});
b.installArtifact(exe);
}