[gegl-qt] Examples: Move example paint engine to examples/common
- From: Jon Nordby <jonnor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl-qt] Examples: Move example paint engine to examples/common
- Date: Mon, 2 Apr 2012 21:46:58 +0000 (UTC)
commit 0877ea8b6c83a2487b9720cb4d80edf1214bcb52
Author: Jon Nordby <jononor gmail com>
Date: Mon Apr 2 23:15:42 2012 +0200
Examples: Move example paint engine to examples/common
There is nothing QML specific about it, so let it be shared.
examples/common/common.pro | 12 ++++++++++++
.../paint-engine.cpp} | 2 +-
.../qml-paint-engine.h => common/paint-engine.h} | 0
examples/examples-common.pri | 2 ++
examples/examples.pro | 3 ++-
examples/qml-paint/qml-paint.cpp | 2 +-
examples/qml-paint/qml-paint.pro | 4 ++--
7 files changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/examples/common/common.pro b/examples/common/common.pro
new file mode 100644
index 0000000..a630905
--- /dev/null
+++ b/examples/common/common.pro
@@ -0,0 +1,12 @@
+include(../../config.pri)
+
+QT = core
+TEMPLATE = lib
+CONFIG += staticlib
+TARGET = $$GEGLQT_LIBNAME-examples-common
+
+SOURCES += paint-engine.cpp
+HEADERS += paint-engine.h
+
+CONFIG += link_pkgconfig
+PKGCONFIG += gegl
diff --git a/examples/qml-paint/qml-paint-engine.cpp b/examples/common/paint-engine.cpp
similarity index 99%
rename from examples/qml-paint/qml-paint-engine.cpp
rename to examples/common/paint-engine.cpp
index 7837df1..1baefa2 100644
--- a/examples/qml-paint/qml-paint-engine.cpp
+++ b/examples/common/paint-engine.cpp
@@ -16,7 +16,7 @@
* Copyright (C) 2011 Jon Nordby <jononor gmail com>
*/
-#include "qml-paint-engine.h"
+#include "paint-engine.h"
#include <gegl.h>
diff --git a/examples/qml-paint/qml-paint-engine.h b/examples/common/paint-engine.h
similarity index 100%
rename from examples/qml-paint/qml-paint-engine.h
rename to examples/common/paint-engine.h
diff --git a/examples/examples-common.pri b/examples/examples-common.pri
index 59611e1..bd072b4 100644
--- a/examples/examples-common.pri
+++ b/examples/examples-common.pri
@@ -22,5 +22,7 @@ isEmpty(USE_EXTERNAL_GEGLQT) {
PKGCONFIG += $$GEGLQT_LIBNAME
}
+LIBS += ../../examples/common/$$GEGLQT_LIBNAME-examples-common
+
CONFIG += link_pkgconfig
PKGCONFIG += gegl
diff --git a/examples/examples.pro b/examples/examples.pro
index 633a852..bd2f50b 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -2,7 +2,8 @@ include(../config.pri)
# TODO: install examples
TEMPLATE = subdirs
-SUBDIRS = \
+SUBDIRS += \
+ common \
# Examples that depend on Qt Widgets (optional)
contains(HAVE_QT_WIDGETS, yes) {
diff --git a/examples/qml-paint/qml-paint.cpp b/examples/qml-paint/qml-paint.cpp
index c3d6756..ac12011 100644
--- a/examples/qml-paint/qml-paint.cpp
+++ b/examples/qml-paint/qml-paint.cpp
@@ -16,7 +16,7 @@
* Copyright (C) 2011 Jon Nordby <jononor gmail com>
*/
-#include "qml-paint-engine.h"
+#include <examples/common/qml-paint-engine.h>
#include <gegl-qt.h>
#include <gegl-qt-declarative.h>
diff --git a/examples/qml-paint/qml-paint.pro b/examples/qml-paint/qml-paint.pro
index c282761..177f39b 100644
--- a/examples/qml-paint/qml-paint.pro
+++ b/examples/qml-paint/qml-paint.pro
@@ -1,7 +1,7 @@
include(../../config.pri)
include(../examples-common.pri)
-SOURCES += qml-paint.cpp qml-paint-engine.cpp
-HEADERS += qml-paint-engine.h
+SOURCES += qml-paint.cpp
+HEADERS +=
RESOURCES += qmlpaint.qrc
OTHER_FILES += qml-paint.qml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]