ikskuh / SDL.zig

A shallow wrapper around SDL that provides object API and error handling
MIT License
360 stars 79 forks source link

Add SDL_ttf Windows support, refactor build file #190

Closed jrasanen closed 3 months ago

jrasanen commented 3 months ago

I'm enabling SDL_ttf on Windows and making it easier to add support for other SDL2 modules in the future.

Breaking API changes include changes to the link(...) function, that now has the option to define which SDL2 library to link:

sdk.link(lib, .dynamic, .SDL2);
sdk.link(lib, .dynamic, .SDL2_ttf);

I've tested the code locally in my own project, as well as by running the following on an Apple Silicon computer and Windows 11:

zig build run-native
zig build run-wrapper-image

I haven't tested on Linux.