[gegl-qt/gsmoke] TEMP: Add generated Qt bindings using smoke-gobject



commit 5e3c5596f550506d184ccbc743e76ac4bae33e73
Author: Jon Nordby <jononor gmail com>
Date:   Mon Oct 17 18:44:19 2011 +0200

    TEMP: Add generated Qt bindings using smoke-gobject
    
    Should perhaps just build the bindings as part of smoke-gobject instead?
    
    FIXME: does not build correctly
    - Fix Babl GIR, or ignore Babl types for now

 config.pri         |    9 +++++++-
 gegl-qt.pro        |    6 +++++
 gsmoke/.gitignore  |    1 +
 gsmoke/exclude.txt |    1 +
 gsmoke/gsmoke.pro  |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 76 insertions(+), 1 deletions(-)
---
diff --git a/config.pri b/config.pri
index f06e6bf..cf16d07 100644
--- a/config.pri
+++ b/config.pri
@@ -78,7 +78,7 @@ contains(HAVE_QT_DECLARATIVE, no) {
 
 HAVE_PYSIDE = yes
 !system(pkg-config pyside){
-    !build_pass:system(echo "PySide not found - no Python support")
+    !build_pass:system(echo "PySide not found - no Python bindings support")
     HAVE_PYSIDE = no
 }
 
@@ -88,6 +88,13 @@ contains(QT_MAJOR_VERSION, 5) {
     HAVE_PYSIDE = no
 }
 
+# GSmoke
+HAVE_GSMOKE = yes
+!system(pkg-config gsmoke){
+    !build_pass:system(echo "GSmoke / Smoke GObject not found - no Qt bindings support")
+    HAVE_GSMOKE = no
+}
+
 HAVE_DOXYGEN = yes
 DOXYGEN = $$system(which doxygen)
 isEmpty(DOXYGEN){
diff --git a/gegl-qt.pro b/gegl-qt.pro
index 3ca316a..7086c28 100644
--- a/gegl-qt.pro
+++ b/gegl-qt.pro
@@ -7,14 +7,20 @@ CONFIG += ordered
 # Subdirectories
 isEmpty(USE_EXTERNAL_GEGLQT) {
     SUBDIRS += gegl-qt
+
     contains(HAVE_PYSIDE, yes) {
         SUBDIRS += pygegl-qt
     }
+
     contains(HAVE_QT_WIDGETS, yes) {
         SUBDIRS += operations
     }
     SUBDIRS +=  plugins doc
 
+    contains(HAVE_GSMOKE, yes) {
+        SUBDIRS += gsmoke
+    }
+
 } else {
     !system(pkg-config --exists $$GEGLQT_LIBNAME):error("Could not find required dependency: GEGL-QT")
 }
diff --git a/gsmoke/.gitignore b/gsmoke/.gitignore
new file mode 100644
index 0000000..feb1f25
--- /dev/null
+++ b/gsmoke/.gitignore
@@ -0,0 +1 @@
+gsmoke*/
diff --git a/gsmoke/exclude.txt b/gsmoke/exclude.txt
new file mode 100644
index 0000000..13f2ca0
--- /dev/null
+++ b/gsmoke/exclude.txt
@@ -0,0 +1 @@
+.*Babl.*
diff --git a/gsmoke/gsmoke.pro b/gsmoke/gsmoke.pro
new file mode 100644
index 0000000..6679ed9
--- /dev/null
+++ b/gsmoke/gsmoke.pro
@@ -0,0 +1,60 @@
+include(../config.pri)
+
+TEMPLATE = lib
+
+OTHER_FILES += \
+    exclude.txt
+
+QMAKE_EXTRA_TARGETS += first
+first.depends += generate compile link
+
+CONFIG += link_pkgconfig
+PKGCONFIG += gegl
+
+MODULE_NAME = gsmokegegl-0.1
+MODULE_DIR = gsmoke/gegl-0.1
+GI_NAME = Gegl-0.1
+PREFIX = gegl
+
+TARGET = $$MODULE_NAME
+
+# FIXME: generate .pc file
+#outputFiles($$MODULE_NAME.pc)
+
+# Generate
+QMAKE_EXTRA_TARGETS += generate
+generate.target = generate
+generate.commands += gsmokegen -o $$OUT_PWD/$$MODULE_DIR -e $$IN_PWD/exclude.txt $$GI_NAME
+
+INCLUDES += $$system(pkg-config --cflags gsmokegobject-2.0)
+INCLUDES += -I../
+
+# Compile
+QMAKE_EXTRA_TARGETS += compile
+compile.depends += generate
+compile.target = compile
+compile.commands += cd $$MODULE_DIR && g++ $$PREFIX*.cpp $$INCLUDES -Wall -fPIC -c
+
+# Link
+QMAKE_EXTRA_TARGETS += link
+link.depends += compile
+link.target = $$MODULE_NAME.so
+link.commands += cd $$MODULE_DIR && g++ $$PREFIX*.o $$LIBRARIES -fPIC -shared -Wl,-soname,$$MODULE_NAME.so -o ../$$MODULE_NAME.so
+
+# Install
+modules.files = $$OUT_PWD/$$MODULE_NAME
+modules.CONFIG += no_check_exist
+modules.path = $$GEGLQT_INSTALL_LIBS
+
+headers.files = $$MODULE_DIR/$$PREFIX*.h
+headers.CONFIG += no_check_exist
+headers.path = $$GEGLQT_INSTALL_HEADERS/$$MODULE_NAME
+
+pkgconfig.files = $$MODULE_NAME.pc
+pkgconfig.path = $$GEGLQT_INSTALL_LIBS/pkgconfig
+
+INSTALLS += modules headers pkgconfig
+
+
+
+



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