From: Martin Potzi Date: Wed, 5 Jan 2011 16:19:56 +0000 (+0100) Subject: Fix python library linkage (use absolute path to python lib) X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=dd1b07d9b807c3bb52352b3c3316e02cf0fea139;p=pykit.git Fix python library linkage (use absolute path to python lib) --- diff --git a/pykit.pro b/pykit.pro index 893bef3..d003a18 100644 --- a/pykit.pro +++ b/pykit.pro @@ -6,7 +6,7 @@ TEMPLATE = app TARGET = pykit DEPENDPATH += . INCLUDEPATH += . -QT += network gui core +QT += network gui core svg # Used to manually link against latest webkit !no_webkit { @@ -32,6 +32,10 @@ isEmpty(LIBPYTHON) { QMAKE_CXXFLAGS += $$system($$PYTHONCONFIG --cflags) QMAKE_CXXFLAGS -= -Wstrict-prototypes LIBS += $$system($$PYTHONCONFIG --ldflags) + # OUCH ... on Mac we sometimes have multiple python versions (in this case MacPorts and native) + # We need to explicitly specify the path as to link against the correct Version + LIBS -= $$system($$PYTHONCONFIG --libs | sed -e "'s/.*\\\\(-lpython[0-9.]*\\\\\).*/\\\\1/'") + LIBS += $$system(ls `$$PYTHONCONFIG --ldflags | sed -e "'s/.*-L\\\\([^ ]*\\\\).*/\\\\1/'"`/lib`$$PYTHONCONFIG --libs | sed -e "'s/.*-l\\\\(python[0-9.]*\\\\).*/\\\\1/'"`* | head -1) } else { LIBS += -l$$LIBPYTHON