-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.zig
More file actions
27 lines (22 loc) · 994 Bytes
/
Copy pathbuild.zig
File metadata and controls
27 lines (22 loc) · 994 Bytes
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
const std = @import("std");
pub fn build(b: *std.Build) void {
const optimize = b.standardOptimizeOption(.{});
const target = b.standardTargetOptions(.{});
const lib = b.addLibrary(.{
.linkage = .static,
.name = "my_php_extension",
.root_module = b.createModule(.{
.root_source_file = b.path("hello.zig"),
.target = target,
.optimize = optimize,
}),
.version = .{ .major = 1, .minor = 0, .patch = 1 },
});
lib.addIncludePath(.{ .cwd_relative = "/opt/homebrew/opt/php@8.4/include/php" });
lib.addIncludePath(.{ .cwd_relative = "/opt/homebrew/opt/php@8.4/include/php/main" });
lib.addIncludePath(.{ .cwd_relative = "/opt/homebrew/opt/php@8.4/include/php/TSRM" });
lib.addIncludePath(.{ .cwd_relative = "/opt/homebrew/opt/php@8.4/include/php/Zend" });
lib.addIncludePath(.{ .cwd_relative = "/opt/homebrew/opt/php@8.4/include" });
lib.linkLibC();
b.installArtifact(lib);
}