[gnome-contacts] meson: Don't specify extra variables for options
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] meson: Don't specify extra variables for options
- Date: Sat, 7 Dec 2019 20:48:08 +0000 (UTC)
commit eed957ac0a6ce361d79f52e88d27b21a857899b4
Author: Niels De Graef <nielsdegraef gmail com>
Date: Sat Dec 7 12:03:30 2019 +0100
meson: Don't specify extra variables for options
man/meson.build | 41 ++++++++++++++++++++---------------------
meson.build | 18 +++++++-----------
src/meson.build | 6 +++---
3 files changed, 30 insertions(+), 35 deletions(-)
---
diff --git a/man/meson.build b/man/meson.build
index ec4c022..ea94abf 100644
--- a/man/meson.build
+++ b/man/meson.build
@@ -1,21 +1,20 @@
-if manpage_enabled
- xsltproc = find_program('xsltproc')
- custom_target('manfile-gnome-contacts',
- input: 'gnome-contacts.xml',
- output: 'gnome-contacts.1',
- install: true,
- install_dir: join_paths(get_option('mandir'), 'man1'),
- command: [
- xsltproc,
- '--nonet',
- '--stringparam', 'man.output.quietly', '1',
- '--stringparam', 'funcsynopsis.style', 'ansi',
- '--stringparam', 'man.th.extra1.suppress', '1',
- '--stringparam', 'man.authors.section.enabled', '0',
- '--stringparam', 'man.copyright.section.enabled', '0',
- '-o', '@OUTPUT@',
- 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
- '@INPUT@'
- ]
- )
-endif
+xsltproc = find_program('xsltproc')
+
+custom_target('manfile-gnome-contacts',
+ input: 'gnome-contacts.xml',
+ output: 'gnome-contacts.1',
+ install: true,
+ install_dir: join_paths(get_option('mandir'), 'man1'),
+ command: [
+ xsltproc,
+ '--nonet',
+ '--stringparam', 'man.output.quietly', '1',
+ '--stringparam', 'funcsynopsis.style', 'ansi',
+ '--stringparam', 'man.th.extra1.suppress', '1',
+ '--stringparam', 'man.authors.section.enabled', '0',
+ '--stringparam', 'man.copyright.section.enabled', '0',
+ '-o', '@OUTPUT@',
+ 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
+ '@INPUT@'
+ ]
+)
diff --git a/meson.build b/meson.build
index d1c5863..e7ac34b 100644
--- a/meson.build
+++ b/meson.build
@@ -13,12 +13,6 @@ add_project_arguments(
language: 'vala'
)
-# Options
-cheese_enabled = get_option('cheese')
-telepathy_enabled = get_option('telepathy')
-docs_enabled = get_option('docs')
-manpage_enabled = get_option('manpage')
-
# Common variables
contacts_app_id = 'org.gnome.Contacts'
@@ -53,12 +47,12 @@ libebook = dependency('libebook-1.2', version: '>=' + min_eds_version)
libedataserver = dependency('libedataserver-1.2', version: '>=' + min_eds_version)
libedataserverui = dependency('libedataserverui-1.2', version: '>=' + min_eds_version)
-if cheese_enabled
+if get_option('cheese')
cheese = dependency('cheese')
cheese_gtk = dependency('cheese-gtk', version: '>= 3.3.91')
endif
-if telepathy_enabled
+if get_option('telepathy')
folks_telepathy = dependency('folks-telepathy', version: '>=' + min_folks_version)
telepathy_glib = dependency('telepathy-glib', version: '>= 0.22.0')
endif
@@ -87,7 +81,7 @@ else
libhandy_vapidir = ''
endif
-valadoc = find_program('valadoc', required: docs_enabled)
+valadoc = find_program('valadoc', required: get_option('docs'))
# Configuration
@@ -112,8 +106,10 @@ meson.add_install_script('build-aux/meson_post_install.py')
subdir('data')
subdir('po')
subdir('src')
-subdir('man')
-if docs_enabled
+if get_option('manpage')
+ subdir('man')
+endif
+if get_option('docs')
subdir('docs')
endif
subdir('tests')
diff --git a/src/meson.build b/src/meson.build
index b94e767..95977fb 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -47,12 +47,12 @@ contacts_deps = [
]
# Add extra stuff given a certain set of options
-if cheese_enabled
+if get_option('cheese')
contacts_deps += [ cheese, cheese_gtk ]
contacts_vala_args += [ '-D', 'HAVE_CHEESE' ]
endif
-if telepathy_enabled
+if get_option('telepathy')
contacts_deps += [ folks_telepathy, telepathy_glib ]
contacts_vala_args += [ '-D', 'HAVE_TELEPATHY' ]
endif
@@ -102,7 +102,7 @@ contacts_c_sources = [
'cc-crop-area.c',
]
-if cheese_enabled
+if get_option('cheese')
contacts_c_sources += 'cheese-flash.c'
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]