Commit cdd25215 authored by Sam Thursfield's avatar Sam Thursfield

meson: Enable seccomp support

parent 3624cef8
......@@ -66,6 +66,9 @@
/* Define if we have libiptcdata */
#mesondefine HAVE_LIBIPTCDATA
/* Define if we have libseccomp */
#mesondefine HAVE_LIBSECCOMP
/* Define if we have libstemmer */
#mesondefine HAVE_LIBSTEMMER
......
......@@ -38,6 +38,7 @@ libgxps = dependency('libgxps', required: false)
libiptcdata = dependency('libiptcdata', required: false)
libosinfo = dependency('libosinfo', version: '> 0.2.9', required: false)
libpng = dependency('libpng', version: '> 0.89', required: false)
libseccomp = dependency('libseccomp', version: '>= 2.0', required: false)
libtiff = dependency('libtiff-4', required: false)
libxml2 = dependency('libxml-2.0', version: '> 2.6')
libvorbis = dependency('vorbisfile', version: '> 0.22')
......@@ -213,6 +214,14 @@ if generic_media_handler_name == 'gstreamer'
endif
endif
##################################################################
# Check for libseccomp
##################################################################
if not libseccomp.found() and host_machine.system() == 'linux'
error('Libseccomp is mandatory for sandboxed metadata extraction')
endif
####################################################################
# D-Bus service files
####################################################################
......@@ -290,6 +299,7 @@ conf.set('HAVE_LIBICU_CHARSET_DETECTION', charset_library_name == 'icu')
conf.set('HAVE_LIBEXIF', libexif.found())
conf.set('HAVE_LIBIPTCDATA', libiptcdata.found())
conf.set('HAVE_LIBSTEMMER', have_libstemmer)
conf.set('HAVE_LIBSECCOMP', libseccomp.found())
conf.set('HAVE_UPOWER', battery_detection_library_name == 'upower')
conf.set('HAVE_GETLINE', cc.has_function('getline', prefix : '#include <stdio.h>'))
......
......@@ -25,9 +25,15 @@ tracker_common_sources = [
# FIXME: need to link against -lkvm on OpenBSD, see configure.ac
tracker_common_dependencies = [glib, gio, gio_unix, libmath]
tracker_common_private_dependencies = [charset_library]
if libseccomp.found()
tracker_common_private_dependencies += [libseccomp]
endif
libtracker_common = library('tracker-common',
tracker_common_sources,
dependencies: tracker_common_dependencies + [charset_library],
dependencies: tracker_common_dependencies + tracker_common_private_dependencies,
c_args: tracker_c_args,
include_directories: [configinc, srcinc],
install: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment