Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: update to latest Zig version #21

Merged
merged 2 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup Zig
run: |
brew install xz
sudo sh -c 'wget -c https://pkg.machengine.org/zig/zig-macos-x86_64-0.12.0-dev.3180+83e578a18.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
sudo sh -c 'wget -c https://pkg.machengine.org/zig/zig-macos-x86_64-0.13.0-dev.351+64ef45eb0.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
- name: build
run: zig build
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Zig stuff
zig-*
.zig-cache
8 changes: 4 additions & 4 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ pub fn build(b: *std.Build) void {
});
addPaths(&lib.root_module); // just for testing
lib.linkLibC();
lib.installHeadersDirectory("include", ".");
lib.installHeadersDirectory(b.path("include"), ".", .{});
b.installArtifact(lib);
}

pub fn addPaths(mod: *std.Build.Module) void {
mod.addSystemFrameworkPath(.{ .path = sdkPath("/Frameworks") });
mod.addSystemIncludePath(.{ .path = sdkPath("/include") });
mod.addLibraryPath(.{ .path = sdkPath("/lib") });
mod.addSystemFrameworkPath(.{ .cwd_relative = sdkPath("/Frameworks") });
mod.addSystemIncludePath(.{ .cwd_relative = sdkPath("/include") });
mod.addLibraryPath(.{ .cwd_relative = sdkPath("/lib") });
}

fn sdkPath(comptime suffix: []const u8) []const u8 {
Expand Down
Loading