SwiftPM: How to verify that PKG_CONFIG_PATH is being used

Newbie question. How can I tell that PKG_CONFIG_PATH is being respected?

I am using Swift 3.0 (swiftlang-800.0.49) under OS X. I do not have pkg-config installed. I have specified the PKG_CONFIG_PATH environment variable and have validated the .pc files at that location. The project builds but the resulting binary links to a different library — according to otool, the path is /usr/lib rather than that specified in my .pc file. I’ve tried ’swift build -v’ and do not see the directory that I specified using PKG_CONFIG_PATH.

Not sure what to try next. Thanks.

-=- Jerry

Hi,

SwiftPM finds the first matching .pc file in the list of search paths,
unfortunately the environment variable PKG_CONFIG_PATH was last in the
list. It was corrected in this commit:

Can you try with a recent snapshot and check if the environment variable is
being respected?

···

On Thu, Sep 29, 2016 at 11:35 PM, Jerry Carter via swift-users < swift-users@swift.org> wrote:

Newbie question. How can I tell that PKG_CONFIG_PATH is being respected?

I am using Swift 3.0 (swiftlang-800.0.49) under OS X. I do not have
pkg-config installed. I have specified the PKG_CONFIG_PATH environment
variable and have validated the .pc files at that location. The project
builds but the resulting binary links to a different library — according to
otool, the path is /usr/lib rather than that specified in my .pc file.
I’ve tried ’swift build -v’ and do not see the directory that I specified
using PKG_CONFIG_PATH.

Not sure what to try next. Thanks.

-=- Jerry
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

--
Ankit