~tristan957/harvest-almanac

821962bdc1427a781e1431861f8592bd7f570263 — Tristan Partin 1 year, 11 months ago f14104c
meson: allow to build only lib or use system lib
3 files changed, 16 insertions(+), 4 deletions(-)

M harvest-glib/meson.build
M meson.build
M meson_options.txt
M harvest-glib/meson.build => harvest-glib/meson.build +1 -1
@@ 108,7 108,7 @@ harvest_glib_dep = declare_dependency(
pkg.generate(
	harvest_glib,
	description: 'GLib-based library for interacting with the Harvest API.',
	filebase: 'harvest-glib-1.0.0',
	filebase: 'harvest-glib-1.0',
	name: 'harvest-glib',
	version: harvest_glib_version,
    requires: [

M meson.build => meson.build +11 -3
@@ 33,9 33,17 @@ libhandy_dep = dependency('libhandy-0.0', version: '>= 0.0.11', required: true, 
libsoup_dep = dependency('libsoup-2.4', version: '>= 2.68.1', required: true, fallback: ['libsoup', 'libsoup_dep'])
libsecret_dep = dependency('libsecret-1', version: '>= 0.19.1', required: true, fallback: ['libsecret', 'libsecret_dep'])

subdir('data')
subdir('harvest-glib')
subdir('harvest-almanac')
if get_option('use-system-harvest-glib')
    harvest_glib_dep = dependency('harvest-glib-1.0', version: '>= 1.0.0', required: false)
else
    subdir('harvest-glib')
endif

if not get_option('lib-only')
    subdir('data')
    subdir('harvest-almanac')
endif

subdir('po')

meson.add_install_script('meson_post_install.sh')

M meson_options.txt => meson_options.txt +4 -0
@@ 0,0 1,4 @@
option('lib-only', type: 'boolean', value: false,
	description: 'Only build harvest-glib, omitting the frontend')
option('use-system-harvest-glib', type: 'boolean', value: false,
	description: 'Use the system provided harvest-glib instead of the local copy')