Commit cfab5f96 authored by Mart Raudsepp's avatar Mart Raudsepp

build: Use meson feature option type where appropriate

parent a9553472
project('tracker', 'c', 'vala', version: '2.2.0-alpha2')
project('tracker', 'c', 'vala',
version: '2.2.0-alpha2',
meson_version: '>=0.47')
gnome = import('gnome')
i18n = import('i18n')
......@@ -66,25 +68,15 @@ add_project_arguments('-DTRACKER_COMPILATION', language: 'c')
enable_fts = get_option('fts')
have_network_manager = false
if get_option('network_manager') != 'no'
network_manager = dependency('libnm', required: get_option('network_manager') == 'yes')
have_network_manager = network_manager.found()
endif
network_manager = dependency('libnm', required: get_option('network_manager'))
have_network_manager = network_manager.found()
##################################################################
# Check for libtracker-common, make sure libstemmer exists
##################################################################
have_libstemmer = false
if get_option('stemmer') != 'no'
libstemmer = cc.find_library('stemmer', required: false)
if libstemmer.found()
have_libstemmer = true
elif get_option('stemmer') == 'yes'
error('stemmer support explicitly requested, but stemmer library couldn\'t be found')
endif
endif
libstemmer = cc.find_library('stemmer', required: get_option('stemmer'))
have_libstemmer = libstemmer.found()
##################################################################
# Check for tracker-fts, allow disabling FTS support
......
......@@ -7,10 +7,10 @@ option('functional_tests', type: 'boolean', value: true,
option('journal', type: 'boolean', value: true,
description: 'Enable database journal backup mechanism')
option('network_manager', type: 'combo', choices: ['auto', 'no', 'yes'], value: 'auto',
description: 'Enable connection detection through NetworkManager')
option('stemmer', type: 'combo', choices: ['auto', 'no', 'yes'], value: 'auto',
description: 'Enable stemming words while indexing')
option('network_manager', type: 'feature', value: 'auto',
description: 'Connection detection through NetworkManager')
option('stemmer', type: 'feature', value: 'auto',
description: 'Stemming words while indexing')
option('unicode_support', type: 'combo', choices: ['icu', 'unistring', 'auto'], value: 'auto',
description: 'Unicode support library to use')
......
......@@ -31,11 +31,7 @@ else
endif
# FIXME: need to link against -lkvm on OpenBSD, see configure.ac
tracker_common_dependencies = [glib, gio, gio_unix, libmath]
if have_libstemmer
tracker_common_dependencies += [libstemmer]
endif
tracker_common_dependencies = [glib, gio, gio_unix, libmath, libstemmer]
libtracker_common = library('tracker-common',
tracker_common_sources,
......
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