You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some libraries, eg SDL, use a tool very much like pkg-config to provide suitable linker and compiler flags, but not pkg-config. In the case of SDL, it's sdl2-config:
Since Package Manager can't reasonably be expected to support each and every config tool out there, it would be nice to be able to include code in Package.swift to do this for it, and provide the flags to SPM.
One approach would be to make pkgConfig support generic, so a different object could be provided. But I looked at the code, and pkgConfig is littered throughout the codebase; it would be challenging to remove it.
Maybe an alternative would be to allow lib and cflags to be passed in at the target level? If this already exists, it's not well-documented.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: ed54afc42067b7d6cde72111bed36340
Issue Description:
Some libraries, eg SDL, use a tool very much like pkg-config to provide suitable linker and compiler flags, but not pkg-config. In the case of SDL, it's sdl2-config:
On macOS:
$ sdl2-config --libs --cflags
-L/usr/local/lib -lSDL2
-I/usr/local/include/SDL2 -D_THREAD_SAFE
On Raspbian:
$ 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
And pkg-config doesn't work at all for SDL.
Since Package Manager can't reasonably be expected to support each and every config tool out there, it would be nice to be able to include code in Package.swift to do this for it, and provide the flags to SPM.
One approach would be to make pkgConfig support generic, so a different object could be provided. But I looked at the code, and pkgConfig is littered throughout the codebase; it would be challenging to remove it.
Maybe an alternative would be to allow lib and cflags to be passed in at the target level? If this already exists, it's not well-documented.
The text was updated successfully, but these errors were encountered: