More build customization options
[pykit.git] / pykit.pro
index a7c2b21..d9ddbb4 100644 (file)
--- a/pykit.pro
+++ b/pykit.pro
@@ -5,14 +5,30 @@ DEPENDPATH += .
 INCLUDEPATH += .
 QT += webkit network gui core
 
+isEmpty(PYTHON) {
+    PYTHON = python
+}
+isEmpty(PYTHONCONFIG) {
+    PYTHONCONFIG = $${PYTHON}-config
+}
+
+isEmpty(LIBBOOSTPYTHON) {
+    LIBBOOSTPYTHON = boost_python
+}
+
 # boost_python
-LIBS += -lboost_python
+LIBS += -l$${LIBBOOSTPYTHON}
 
 # python
-QMAKE_CXXFLAGS += $$system(python-config --cflags)
-QMAKE_CXXFLAGS -= -Wstrict-prototypes
-QMAKE_CFFLAGS += $$system(python-config --cflags)
-LIBS += $$system(python-config --ldflags)
+isEmpty(LIBPYTHON) {
+    QMAKE_CXXFLAGS += $$system($$PYTHONCONFIG --cflags)
+    QMAKE_CXXFLAGS -= -Wstrict-prototypes
+    LIBS += $$system($$PYTHONCONFIG --ldflags)
+}
+else {
+    LIBS += -l$$LIBPYTHON
+}
+
 mac {
     # Qt is not available as univeral library and provides
     # a correct -arch tag automatically