Commit 281011a1 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Use meson's feature build options

parent 6a291d84
......@@ -11,7 +11,7 @@ enhance the user interface that is used by zathura.
meson (>= 0.43)
meson (>= 0.47)
glib (>= 2.50)
gtk3 (>= 3.20)
......@@ -19,7 +19,7 @@ libnotify (optional, for notification support)
json-c (optional, for configuration dumping support)
To disable the optional support for libnotify and json-c, configure the build
system with -Denable-notify=false or -Denable-json=false.
system with -Dnotify=disabled or -Djson=disabled.
doxygen = find_program('doxygen', required: false)
if get_option('enable-docs') and doxygen.found()
doxygen = find_program('doxygen', required: get_option('docs'))
if doxygen.found()
conf_data = configuration_data()
conf_data.set('DOXYGEN_INPUT', meson.source_root())
conf_data.set('DOXYGEN_OUTPUT', meson.current_build_dir())
project('girara', 'c',
version: '0.3.1',
meson_version: '>=0.43',
meson_version: '>=0.47',
default_options: 'c_std=c11',
......@@ -59,16 +59,16 @@ flags = cc.get_supported_arguments(flags)
# optional dependencies
pc_requires_private = ['pango']
libnotify = dependency('libnotify', version: '>=0.7.0', required: false)
jsonc = dependency('json-c', required: false)
libnotify = dependency('libnotify', version: '>=0.7.0', required: get_option('notify'))
jsonc = dependency('json-c', required: get_option('json'))
if get_option('enable-notify') and libnotify.found()
if libnotify.found()
build_dependencies += libnotify
defines += '-DWITH_LIBNOTIFY'
pc_requires_private += 'libnotify'
if get_option('enable-json') and jsonc.found()
if jsonc.found()
build_dependencies += jsonc
defines += '-DWITH_JSON'
pc_requires_private += 'json-c'
type: 'boolean',
value: false,
description: 'Enable libnotify support if available.'
type: 'feature',
value: 'disabled',
description: 'Notifications using libnotify.'
type: 'boolean',
value: true,
description: 'Enable json-c support if available.'
type: 'feature',
value: 'auto',
description: 'Dump configuration using JSON.'
type: 'boolean',
value: true,
description: 'Build Doxygen documentation if available.'
type: 'feature',
value: 'auto',
description: 'Doxygen API documentation.'
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