floooh / sokol-tools

Command line tools for use with sokol headers
MIT License
219 stars 54 forks source link

Fix build.zig for Zig 0.13 #135

Closed luchak closed 1 month ago

luchak commented 1 month ago

This change updates build.zig so it works with Zig 0.13 by using the b.path() function to initialize LazyPaths. Apparently specifying paths with struct literals is no longer allowed? Or at least not with these struct literals. This change also adds sokold.cc to a list of sources it was missing from, which was causing a link error.

I'm new to Zig, so it's possible there's a more idiomatic way to do this, but b.path() is what I've seen elsewhere.

I didn't see any tests for the Zig build, so I just smoke tested this change on my Mac: build the binary, run it on a few GLSL files fromtest/, make sure the output looks halfway reasonable.

floooh commented 1 month ago

Many thanks! Yes, Builder.path() is the "proper" way to build a LazyPath now.