From d443a3c2509889533ca812c163056bace396b586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 14 Jun 2023 20:35:58 +0200 Subject: New upstream version 0.32.1 --- subprojects/shotwell-facedetect/meson.build | 62 +++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 subprojects/shotwell-facedetect/meson.build (limited to 'subprojects/shotwell-facedetect/meson.build') diff --git a/subprojects/shotwell-facedetect/meson.build b/subprojects/shotwell-facedetect/meson.build new file mode 100644 index 0000000..70570e4 --- /dev/null +++ b/subprojects/shotwell-facedetect/meson.build @@ -0,0 +1,62 @@ +project('shotwell-facedetect', ['c', 'cpp'], default_options : ['cpp_std=c++17']) +gnome = import('gnome') +facedetect_dep = dependency('opencv4', version : ['>= 4.0.0'], required : false) +if not facedetect_dep.found() + facedetect_dep = dependency('opencv', version : ['>= 3.4.0'], required : true) +endif +cpp = meson.get_compiler('cpp') +has_dnn = cpp.has_header('opencv2/dnn.hpp', dependencies: facedetect_dep) +if has_dnn + dnn_define = declare_dependency(compile_args: '-DHAS_OPENCV_DNN') +else + dnn_define = [] +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.') + +con = configuration_data() +con.set('libexecdir', join_paths(get_option('prefix'), libexecdir)) + +if meson.is_subproject() + config_incdir = include_directories('../..') +else + config_incdir = include_directories('.') + configure_file( + input: 'org.gnome.Shotwell.Faces1.desktop.in', + output: 'org.gnome.Shotwell.Faces1.desktop', + configuration: con, + install: true, + install_dir : join_paths(get_option('datadir'), 'applications') + ) +endif + +executable('shotwell-facedetect', + 'shotwell-facedetect.cpp', 'facedetect-opencv.cpp', gdbus_src, + dependencies : [facedetect_dep, gio, gio_unix, dnn_define], + install : true, + include_directories: config_incdir, + install_dir : libexecdir) +install_data('haarcascade_frontalface_alt.xml', + install_dir : join_paths(get_option('datadir'), 'shotwell', 'facedetect')) +install_data('haarcascade_profileface.xml', + install_dir : join_paths(get_option('datadir'), 'shotwell', 'facedetect')) +install_data( + 'openface.nn4.small2.v1.t7', + install_dir: join_paths(get_option('datadir'), 'shotwell', 'facedetect') +) + +install_data('deploy.prototxt', install_dir: join_paths(get_option('datadir'), 'shotwell', 'facedetect')) + +configure_file( + input : 'org.gnome.Shotwell.Faces1.service.in', + output : 'org.gnome.Shotwell.Faces1.service', + configuration: con, + install: true, + install_dir : join_paths(get_option('datadir'), 'dbus-1', 'services') + ) -- cgit v1.2.3