[shotwell/wip/phako/enhanced-faces: 11/17] facedetect: Make DBus service stand-alone



commit 90a8412a3d1d541e2defb0a911f319438ebf0f56
Author: Jens Georg <mail jensge org>
Date:   Thu Oct 11 09:48:33 2018 +0200

    facedetect: Make DBus service stand-alone
    
    So it can be built individually

 meson.build                                                    |  2 +-
 .../shotwell-facedetect}/facedetect-haarcascade.xml            |  0
 .../shotwell-facedetect}/facedetect-opencv.cpp                 |  0
 {facedetect => subprojects/shotwell-facedetect}/meson.build    | 10 ++++++++--
 .../shotwell-facedetect}/org.gnome.Shotwell.Faces1.service.in  |  0
 .../shotwell-facedetect}/org.gnome.ShotwellFaces1.xml          |  0
 .../shotwell-facedetect}/shotwell-facedetect.cpp               |  0
 .../shotwell-facedetect}/shotwell-facedetect.hpp               |  0
 8 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index db99fd62..b7296d4a 100644
--- a/meson.build
+++ b/meson.build
@@ -88,7 +88,7 @@ endif
 
 if get_option('face-detection')
   add_global_arguments(['--define=ENABLE_FACES'], language : 'vala')
-  subdir('facedetect')
+  subproject('shotwell-facedetect')
 endif
 
 json_glib = dependency('json-glib-1.0')
diff --git a/facedetect/facedetect-haarcascade.xml 
b/subprojects/shotwell-facedetect/facedetect-haarcascade.xml
similarity index 100%
rename from facedetect/facedetect-haarcascade.xml
rename to subprojects/shotwell-facedetect/facedetect-haarcascade.xml
diff --git a/facedetect/facedetect-opencv.cpp b/subprojects/shotwell-facedetect/facedetect-opencv.cpp
similarity index 100%
rename from facedetect/facedetect-opencv.cpp
rename to subprojects/shotwell-facedetect/facedetect-opencv.cpp
diff --git a/facedetect/meson.build b/subprojects/shotwell-facedetect/meson.build
similarity index 85%
rename from facedetect/meson.build
rename to subprojects/shotwell-facedetect/meson.build
index 150817df..07c0c70e 100644
--- a/facedetect/meson.build
+++ b/subprojects/shotwell-facedetect/meson.build
@@ -1,6 +1,5 @@
+project('shotwell-facedetect', ['c', 'cpp'])
 gnome = import('gnome')
-subproject = ('facedetect')
-add_languages('cpp')
 facedetect_dep = dependency('opencv', version : ['>= 2.3.0'], required : true)
 cpp = meson.get_compiler('cpp')
 has_dnn = cpp.has_header('opencv2/dnn.hpp', dependencies: facedetect_dep)
@@ -12,11 +11,18 @@ endif
 
 libexecdir = join_paths(get_option('libexecdir'), 'shotwell')
 
+gio = dependency('gio-2.0', version: '>= 2.40')
 gio_unix = dependency('gio-unix-2.0', required : true)
 gdbus_src = gnome.gdbus_codegen('dbus-interface',
   sources: 'org.gnome.ShotwellFaces1.xml',
   interface_prefix : 'org.gnome.')
 
+if meson.is_subproject()
+    config_incdir = include_directories('../..')
+else
+    config_incdir = include_directories('.')
+endif
+
 executable('shotwell-facedetect',
            'shotwell-facedetect.cpp', 'facedetect-opencv.cpp', gdbus_src,
            dependencies : [facedetect_dep, gio, gio_unix, dnn_define],
diff --git a/facedetect/org.gnome.Shotwell.Faces1.service.in 
b/subprojects/shotwell-facedetect/org.gnome.Shotwell.Faces1.service.in
similarity index 100%
rename from facedetect/org.gnome.Shotwell.Faces1.service.in
rename to subprojects/shotwell-facedetect/org.gnome.Shotwell.Faces1.service.in
diff --git a/facedetect/org.gnome.ShotwellFaces1.xml 
b/subprojects/shotwell-facedetect/org.gnome.ShotwellFaces1.xml
similarity index 100%
rename from facedetect/org.gnome.ShotwellFaces1.xml
rename to subprojects/shotwell-facedetect/org.gnome.ShotwellFaces1.xml
diff --git a/facedetect/shotwell-facedetect.cpp b/subprojects/shotwell-facedetect/shotwell-facedetect.cpp
similarity index 100%
rename from facedetect/shotwell-facedetect.cpp
rename to subprojects/shotwell-facedetect/shotwell-facedetect.cpp
diff --git a/facedetect/shotwell-facedetect.hpp b/subprojects/shotwell-facedetect/shotwell-facedetect.hpp
similarity index 100%
rename from facedetect/shotwell-facedetect.hpp
rename to subprojects/shotwell-facedetect/shotwell-facedetect.hpp


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