Using pkg-config alternatives in Swift PM?

I want to create a Swift module for SDL2, but it doesn’t support pkg-config. Instead, it uses its own tool called sdl2-config, which works in very much the same way. Is there any way to tell the Swift PackageManager to use that instead of pkg-config?

Alternatively, how do I specify the following flags in my Package.swift?

$ sdl2-config --libs --cflags
-L/usr/local/lib -Wl,-rpath,/usr/local/lib -Wl,--enable-new-dtags -lSDL2
-I/usr/local/include/SDL2 -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -D_REENTRANT

Thanks.

Terms of Service

Privacy Policy

Cookie Policy