clydeshaffer / GameTankEmulator

An emulator for the GameTank, a real physical hardware game console I've built
MIT License
15 stars 9 forks source link

Use sdl2-config for build flags on linux #23

Closed nickgirardo closed 4 months ago

nickgirardo commented 4 months ago

I'm unsure if this will help anyone on normal repos, but it seems necessary for my Nixos setup.

Example sdl2-config output on Nixos:

$ sdl2-config --libs
-L/nix/store/rk2n6p9ihz60i0gn2wrv6cknmkrwvd5a-SDL2-2.30.2/lib -Wl,-rpath,/nix/store/rk2n6p9ihz60i0gn2wrv6cknmkrwvd5a-SDL2-2.30.2/lib -Wl,--enable-new-dtags -lSDL2
$ sdl2-config --cflags
-I/nix/store/p2yfmggqkrgbfai4hnmx789lvk7ip2kf-SDL2-2.30.2-dev/include/SDL2 -I/nix/store/p2yfmggqkrgbfai4hnmx789lvk7ip2kf-SDL2-2.30.2-dev/include/SDL2 -I/nix/store/p2yfmggqkrgbfai4hnmx789lvk7ip2kf-SDL2-2.30.2-dev/include/SDL2 -I/nix/store/p2yfmggqkrgbfai4hnmx789lvk7ip2kf-SDL2-2.30.2-dev/include/SDL2 -D_REENTRANT

Note that aside from all the /nix stuff the normal flags you'd expect (-lSDL2) are used