summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorErnestas Kulik <ernestask@gnome.org>2017-03-11 00:30:29 +0200
committerErnestas Kulik <ernestask@gnome.org>2017-03-11 00:40:19 +0200
commit63a7e1ebad21787db9b4d2a6bf2f29067a84b75f (patch)
tree9f016592e6b22ead5b5a378b1693b0d2f2796860 /meson.build
parentad17373e6cb8a825f7d60edf72c63db859610ece (diff)
downloadnautilus-63a7e1ebad21787db9b4d2a6bf2f29067a84b75f.tar.gz
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
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build34
1 files changed, 16 insertions, 18 deletions
diff --git a/meson.build b/meson.build
index 63f13c451..6aa73125a 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)