# Using pkg-config alternatives in Swift PM?

**URL:** <https://forums.swift.org/t/using-pkg-config-alternatives-in-swift-pm/30891>\
**Category:** Using Swift\
**Tags:** packagemanager\
**Created:** [November 19, 2019, 3:23am UTC](https://forums.swift.org/t/using-pkg-config-alternatives-in-swift-pm/30891 "2019-11-19T03:23:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JetForMe](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jetforme/32/482_2.png) [@JetForMe](https://forums.swift.org/u/JetForMe)\
**Post date:** [November 19, 2019, 3:23am UTC](https://forums.swift.org/t/using-pkg-config-alternatives-in-swift-pm/30891/1 "2019-11-19T03:23:15Z")

</div>

I want to create a Swift module for [SDL2](http://libsdl.org), 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`?

```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.
