Skip to content

Commit

Permalink
update to zig 0.11.0 (#2)
Browse files Browse the repository at this point in the history
* update to zig 0.11.0

* only use 0.11.0 in CI
  • Loading branch information
mattnite authored Aug 31, 2023
1 parent 98fb7c5 commit 2bd13f5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v2
- uses: goto-bus-stop/setup-zig@v2
with:
version: master
version: 0.11.0
- name: install libudev
run: sudo apt install -y libudev-dev
- name: build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
- uses: actions/checkout@v2
- uses: goto-bus-stop/setup-zig@v2
with:
version: master
version: 0.11.0
- name: build
run: zig build
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
- uses: actions/checkout@v2
- uses: goto-bus-stop/setup-zig@v2
with:
version: master
version: 0.11.0
- name: build
run: zig build
8 changes: 4 additions & 4 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ fn create_libusb(
lib.addCSourceFiles(sunos_src, &.{});
} else unreachable;

lib.addIncludePath("libusb");
lib.addIncludePath(.{ .path = "libusb" });
lib.installHeader("libusb/libusb.h", "libusb.h");

// config header
if (target.isDarwin()) {
lib.addIncludePath("Xcode");
lib.addIncludePath(.{ .path = "Xcode" });
} else if (target.getAbi() == .msvc) {
lib.addIncludePath("msvc");
lib.addIncludePath(.{ .path = "msvc" });
} else if (target.getAbi() == .android) {
lib.addIncludePath("android");
lib.addIncludePath(.{ .path = "android" });
} else {
const config_h = b.addConfigHeader(.{ .style = .{
.autoconf = .{ .path = "config.h.in" },
Expand Down

0 comments on commit 2bd13f5

Please sign in to comment.