[nautilus] meson: actually use optional dependencies
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] meson: actually use optional dependencies
- Date: Fri, 10 Mar 2017 22:40:33 +0000 (UTC)
commit 63a7e1ebad21787db9b4d2a6bf2f29067a84b75f
Author: Ernestas Kulik <ernestask gnome org>
Date: Sat Mar 11 00:30:29 2017 +0200
meson: actually use optional dependencies
EXIF and Exempi are currently only being detected due to an oversight.
This commit makes Meson define the preprocessor macros needed to use the
libraries.
https://bugzilla.gnome.org/show_bug.cgi?id=779879
config.h.meson | 2 ++
meson.build | 34 ++++++++++++++++------------------
src/meson.build | 8 ++++++++
3 files changed, 26 insertions(+), 18 deletions(-)
---
diff --git a/config.h.meson b/config.h.meson
index 6391b75..c494c9c 100644
--- a/config.h.meson
+++ b/config.h.meson
@@ -1,6 +1,8 @@
#mesondefine VERSION
#mesondefine PACKAGE_VERSION
#mesondefine GETTEXT_PACKAGE
+#mesondefine HAVE_EXEMPI
+#mesondefine HAVE_EXIF
#mesondefine HAVE_SELINUX
#mesondefine ENABLE_DESKTOP
#mesondefine ENABLE_PACKAGEKIT
diff --git a/meson.build b/meson.build
index 63f13c4..6aa7312 100644
--- a/meson.build
+++ b/meson.build
@@ -55,20 +55,6 @@ gsettings_desktop_schemas = dependency ('gsettings-desktop-schemas',
libm = cc.find_library ('libm')
-exif = dependency ('libexif',
- version: exif_ver,
- required: get_option ('enable-exif'))
-exempi = dependency ('exempi-2.0',
- version: exempi_ver,
- required: get_option ('enable-xmp'))
-selinux = dependency ('libselinux',
- version: selinux_ver,
- required: get_option ('enable-selinux'))
-
-if get_option ('enable-tracker')
- tracker_sparql = dependency ('tracker-sparql-1.0')
-endif
-
conf = configuration_data ()
conf.set_quoted ('VERSION', meson.project_version ())
conf.set_quoted ('PACKAGE_VERSION', meson.project_version ())
@@ -77,22 +63,34 @@ conf.set_quoted ('LOCALEDIR', join_paths (prefix, localedir))
conf.set_quoted ('NAUTILUS_DATADIR', join_paths (datadir, 'nautilus'))
conf.set_quoted ('NAUTILUS_EXTENSIONDIR', join_paths (prefix, extensiondir))
-if get_option ('enable-selinux')
- conf.set10 ('HAVE_SELINUX', true)
-endif
-
if get_option ('enable-desktop')
conf.set10 ('ENABLE_DESKTOP', true)
endif
+if get_option ('enable-exif')
+ exif = dependency ('libexif', version: exif_ver)
+ conf.set10 ('HAVE_EXIF', true)
+endif
+
if get_option ('enable-packagekit')
conf.set10 ('ENABLE_PACKAGEKIT', true)
endif
+if get_option ('enable-selinux')
+ selinux = dependency ('libselinux', version: selinux_ver)
+ conf.set10 ('HAVE_SELINUX', true)
+endif
+
if get_option ('enable-tracker')
+ tracker_sparql = dependency ('tracker-sparql-1.0')
conf.set10 ('ENABLE_TRACKER', true)
endif
+if get_option ('enable-xmp')
+ exempi = dependency ('exempi-2.0', version: exempi_ver)
+ conf.set10 ('HAVE_EXEMPI', true)
+endif
+
configure_file (input: 'config.h.meson',
output: 'config.h',
configuration: conf)
diff --git a/src/meson.build b/src/meson.build
index d66e970..83723b9 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -280,6 +280,10 @@ nautilus_deps = [glib,
x11,
gmodule_no_export]
+if get_option ('enable-exif')
+ nautilus_deps += exif
+endif
+
if get_option ('enable-tracker')
nautilus_deps += tracker_sparql
endif
@@ -288,6 +292,10 @@ if get_option ('enable-selinux')
nautilus_deps += selinux
endif
+if get_option ('enable-xmp')
+ nautilus_deps += exempi
+endif
+
libnautilus = static_library ('nautilus',
libnautilus_sources,
dependencies: nautilus_deps,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]