I built a Swift PM package that uses the SDL 2 library, while I do specify a pkgConfig in my Package.swift, I still need to specify the -Xlinker -L/usr/local/lib
flag when calling swift run
or swift build
.
Calling pkg-config --libs --cflags sdl2
does display -L/usr/local/lib
so this information should be available to Swift PM.
I don't understand what is happening, is this a normal behaviour? Or does this mean I'm doing something wrong?
Thank you!