[gegl-qt] Build: Look up generated pygegl-qt files correctly in OOT build



commit 02638f05ba35c1cb2a7774a0bad6484cefe5018d
Author: Jon Nordby <jononor gmail com>
Date:   Sun Mar 11 16:09:12 2012 +0100

    Build: Look up generated pygegl-qt files correctly in OOT build

 config.pri                          |    3 +++
 pygegl-qt/pygegl-qt.pro             |   13 +++++++++----
 pygegl-qt/typesystem_gegl-qt.xml.in |    2 +-
 3 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/config.pri b/config.pri
index 7a35b3d..807b7e7 100644
--- a/config.pri
+++ b/config.pri
@@ -90,6 +90,7 @@ SUBST_VARIABLES += \
     GEGLQT_DECLARATIVE_PKGCONFIG \
     GEGLQT_PROJECTBRIEF \
     GEGLQT_PROJECTNAME \
+    GEGLQT_IN_PWD \
 
 # Generate the specified file from its .in template, and substitute variables
 # Variables to be substituted in .in files must be of the form @VARIABLE_NAME@
@@ -97,6 +98,8 @@ defineTest(outputFile) {
     out = $$OUT_PWD/$$1
     in = $$PWD/$${1}.in
 
+    GEGLQT_IN_PWD = $$IN_PWD
+
     !exists($$in) {
         error($$in does not exist!)
         return(false)
diff --git a/pygegl-qt/pygegl-qt.pro b/pygegl-qt/pygegl-qt.pro
index 7c2efed..92f882f 100644
--- a/pygegl-qt/pygegl-qt.pro
+++ b/pygegl-qt/pygegl-qt.pro
@@ -7,13 +7,18 @@ first.depends += generate compile link
 
 TYPESYSTEM_DIR = $$system(pkg-config pyside --variable=typesystemdir)
 
-LIBGEGLQT_SRC_DIR = ../gegl-qt
+LIBGEGLQT_SRC_DIR = $$IN_PWD/../gegl-qt
+LIBGEGLQT_BUILD_DIR = $$OUT_PWD/../gegl-qt
+TOP_SRC_DIR = $$IN_PWD/..
+TOP_BUILD_DIR = $$OUT_PWD/..
 PYSIDE_INCLUDE_DIR = $$system(pkg-config --variable=includedir pyside)
 HEADERDIR_QT = $$[QT_INSTALL_HEADERS]
-GEN_INCLUDE_PATHS = ..:$$LIBGEGLQT_SRC_DIR:$$HEADERDIR_QT/QtCore:$$HEADERDIR_QT
+GEN_INCLUDE_PATHS = $$TOP_SRC_DIR:$$LIBGEGLQT_SRC_DIR:$$HEADERDIR_QT/QtCore:$$HEADERDIR_QT
 
 INCLUDES += \
-    -I.. \
+    -I$$TOP_BUILD_DIR \
+    -I$$TOP_SRC_DIR \
+    -I$$LIBGEGLQT_BUILD_DIR \
     -I$$LIBGEGLQT_SRC_DIR \
     -I$$PYSIDE_INCLUDE_DIR/QtCore \
     -I$$PYSIDE_INCLUDE_DIR/QtGui \
@@ -48,7 +53,7 @@ generate.target = generate
 generate.commands += generatorrunner --generatorSet=shiboken \
                 global.h \
                 --include-paths=$$GEN_INCLUDE_PATHS \
-                --typesystem-paths=.:$$TYPESYSTEM_DIR \
+                --typesystem-paths=$$OUT_PWD:$$IN_PWD:$$TYPESYSTEM_DIR \
                 --output-directory=. \
                 typesystem_gegl-qt.xml
 
diff --git a/pygegl-qt/typesystem_gegl-qt.xml.in b/pygegl-qt/typesystem_gegl-qt.xml.in
index 81aac0c..ca6fba7 100644
--- a/pygegl-qt/typesystem_gegl-qt.xml.in
+++ b/pygegl-qt/typesystem_gegl-qt.xml.in
@@ -4,7 +4,7 @@
     <load-typesystem name="typesystem_declarative.xml" generate="no" />
 
     <primitive-type name="GeglNodePtr">
-        <conversion-rule file="geglnode_conversions.h"/>
+        <conversion-rule file="@GEGLQT_IN_PWD@/geglnode_conversions.h"/>
         <include file-name="pygobject.h" location="global"/>
     </primitive-type>
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]