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

[build] remove examples/build.zig, incorporate into main build.zig #4856

Merged
merged 1 commit into from
Mar 25, 2025

Conversation

marler8997
Copy link
Contributor

@marler8997 marler8997 commented Mar 25, 2025

This is a different way to solve the same issue that #4854 solves. That PR keeps the examples build separate and connects it to the raylib build via a zon file, this PR instead removes the second build.zig in the examples directory and incorporates it into the main build.zig.

My personal preference would be this PR but both solve the underlying issue.

Note that running zig build will still only build the raylib library, I've added a separate examples target that will build all the examples (what running zig build in the examples directory would have done before).

NOTE: I also updated the examples build configuration so that we only add the extra include paths for the examples that need it.

@marler8997 marler8997 marked this pull request as draft March 25, 2025 16:05
@marler8997 marler8997 marked this pull request as ready for review March 25, 2025 16:22
Removes the second build.zig in the examples directory and incorporates it
into the main build.zig. This gives the zig build system the data needed to
know if the raylib library needs to be rebuilt when running any example.
@raysan5 raysan5 merged commit beaadc9 into raysan5:master Mar 25, 2025
@raysan5
Copy link
Owner

raysan5 commented Mar 25, 2025

@marler8997 Great! Thanks for the review!

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