SwiftPM, pkg-config and Xcode 8


(Jason Dusek) #1

Hi All,

I recently discovered the pkgConfig feature for Package.swift and it
definitely makes binding to system libraries easier. After changing CLibPQ
<https://github.com/solidsnack/CLibPQ> to use it, I noticed I was able to
build a dependent project with swift build but Xcode could not build the
project any longer. This led me to the build settings, to try adding
/usr/local/{include,lib} for includes and libraries; but this did not seem
to make any difference -- all the symbols from the native lib were
unresolvable. This after several instances of cleaning the project,
restarting Xcode, &c.

Does Xcode 8 consume the Package.swift file? What steps can I take to
ensure that native libs which discover their paths with pkgConfig can build
from Xcode, too?

Kind Regards,

Jason Dusek
‚Äč