From 8525e325c3cc00a9288b5c6670f7ea82c4f650f6 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 28 Sep 2011 17:13:21 +0000 Subject: [PATCH] get frameworks from pkg-config as well --- makepanda/makepandacore.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 8f68624a1e..e7f94cfd64 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -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"):