get frameworks from pkg-config as well

This commit is contained in:
David Rose 2011-09-28 17:13:21 +00:00
parent 9009141e45
commit 8525e325c3

View File

@ -1008,9 +1008,21 @@ def PkgConfigGetLibs(pkgname, tool = "pkg-config"):
result = handle.read().strip()
handle.close()
libs = []
for l in result.split(" "):
# Walk through the result arguments carefully. Look for -lname as
# well as -framework name.
r = result.split(' ')
ri = 0
while ri < len(r):
l = r[ri]
if l.startswith("-l") or l.startswith("/"):
libs.append(l)
elif l == '-framework':
libs.append(l)
ri += 1
libs.append(r[ri])
ri += 1
return libs
def PkgConfigGetIncDirs(pkgname, tool = "pkg-config"):