summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2020-04-19 14:17:59 +0200
committerNiels De Graef <nielsdegraef@gmail.com>2020-04-19 14:24:41 +0200
commit77fa086cfd82d45fe4836a7aa748abbe95fe43e4 (patch)
treecf5a36d9ca74df09d83903ba595f2e5d9e05cd6e
parent42101865dc375e229eec2faba00bb2d94332f0f2 (diff)
downloadgnome-contacts-77fa086cfd82d45fe4836a7aa748abbe95fe43e4.tar.gz
Make Cheese a feature dependency
libcanberra-gtk got removed in the latest Flatpak runtime (3.38), so we can't build cheese as it hard depends on it. Luckily, we don't hard-depend on cheese, so let's get rid of it (for now). As an extra, this commit also makes Cheese an optional dependency, making it a bit easier to build it at the first go (without installing cheese-devel) and a shorter CI time.
-rw-r--r--data/flatpak/org.gnome.Contacts.Devel.json15
-rw-r--r--meson.build6
-rw-r--r--meson_options.txt2
-rw-r--r--src/meson.build4
4 files changed, 5 insertions, 22 deletions
diff --git a/data/flatpak/org.gnome.Contacts.Devel.json b/data/flatpak/org.gnome.Contacts.Devel.json
index 1b1dae2..ef2af27 100644
--- a/data/flatpak/org.gnome.Contacts.Devel.json
+++ b/data/flatpak/org.gnome.Contacts.Devel.json
@@ -166,21 +166,6 @@
]
},
{
- "name": "cheese",
- "buildsystem": "meson",
- "config-opts": [
- "-Dgtk_doc=false",
- "-Dintrospection=true",
- "-Dman=false"
- ],
- "sources": [
- {
- "type": "git",
- "url": "https://gitlab.gnome.org/GNOME/cheese.git"
- }
- ]
- },
- {
"name": "libhandy",
"buildsystem": "meson",
"builddir": true,
diff --git a/meson.build b/meson.build
index 541fa38..d396073 100644
--- a/meson.build
+++ b/meson.build
@@ -46,10 +46,8 @@ 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 get_option('cheese')
- cheese = dependency('cheese')
- cheese_gtk = dependency('cheese-gtk', version: '>= 3.3.91')
-endif
+cheese_dep = dependency('cheese', required: get_option('cheese'))
+cheese_gtk_dep = dependency('cheese-gtk', version: '>= 3.3.91', required: get_option('cheese'))
if get_option('telepathy')
folks_telepathy = dependency('folks-telepathy', version: '>=' + min_folks_version)
diff --git a/meson_options.txt b/meson_options.txt
index b83a1c7..101161c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,5 +1,5 @@
option('profile', type: 'combo', choices: [ 'default', 'development' ], value: 'default', description: 'Indicate whether this is a nightly build (used for CI purposes)')
-option('cheese', type: 'boolean', value: true, description: 'Enable cheese webcam support.')
+option('cheese', type: 'feature', value: 'auto', description: 'If enabled, allows creaing an avatar with the webcam')
option('telepathy', type: 'boolean', value: false, description: 'Enable Telepathy call/chat support.')
option('manpage', type: 'boolean', value: true, description: 'Enable building man pages.')
option('docs', type: 'boolean', value: false, description: 'Whether to build the valadoc docs.')
diff --git a/src/meson.build b/src/meson.build
index c663c61..ba5dd1b 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -47,7 +47,7 @@ contacts_deps = [
]
# Add extra stuff given a certain set of options
-if get_option('cheese')
+if cheese_dep.found() and cheese_gtk_dep.found()
contacts_deps += [ cheese, cheese_gtk ]
contacts_vala_args += [ '-D', 'HAVE_CHEESE' ]
endif
@@ -103,7 +103,7 @@ contacts_c_sources = [
'cc-crop-area.c',
]
-if get_option('cheese')
+if cheese_dep.found() and cheese_gtk_dep.found()
contacts_c_sources += 'cheese-flash.c'
endif