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

Add headers to artifact include tree #9

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

pvande
Copy link
Contributor

@pvande pvande commented Dec 19, 2024

This should enable other C dependencies to properly link against the library by doing something like the following:

const other_lib = b.addStaticLibrary(.{...});
other_lib.addCSourceFile(.{...});

other_lib.linkLibrary(b.dependency("zglfw", .{}));
// Or…
other_lib.addIncludePath(b.dependency("zglfw", .{}).getEmittedIncludeTree());

(Caveat: novice Zig user. Please feel free to correct any misunderstandings you see.)

This should enable other C dependencies to properly link against the library by doing something like the following:

``` zig
const other_lib = b.addStaticLibrary(.{});
other_lib.addIncludePath(b.dependency("zglfw", .{}).getEmittedIncludeTree());
```

(Caveat: novice Zig user. Please feel free to correct any misunderstandings you see.)
`installHeadersDirectory` exists on `Compile`, not `Build`.
@hazeycode hazeycode changed the title Expose the glfw headers Add headers to artifact include tree Jan 2, 2025
@hazeycode hazeycode merged commit 4e15633 into zig-gamedev:main Jan 2, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants