summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2017-08-18 20:42:38 +0200
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2017-08-18 23:06:29 -0300
commit1b04e6f4f5bb40c16dcb6f2477460689034aec0b (patch)
treec336d50ec09948bc02a783760559f8ec47a7e229 /meson.build
parent29092fcfe6e4734a582d76a074ac0df3004a0ceb (diff)
downloadgnome-calendar-1b04e6f4f5bb40c16dcb6f2477460689034aec0b.tar.gz
project: Minor meson improvements.
This patch makes some minor improvements to the meson build system. The changes are as follows: * Avoid conditional statements when setting config.h values. * Ordered calendar dependencies. * Reused variables derived from options. * Removed unnecessary new line in the output at the configuration's end. * Use set10 function avoiding the trinary operator. * Removed dependencies on the libgcal dependency, as they are not needed. https://bugzilla.gnome.org/show_bug.cgi?id=786481
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build22
1 files changed, 9 insertions, 13 deletions
diff --git a/meson.build b/meson.build
index b3d3e3c7..b21f80e8 100644
--- a/meson.build
+++ b/meson.build
@@ -71,9 +71,7 @@ check_headers = [
]
foreach header: check_headers
- if cc.has_header(header[1])
- config_h.set(header[0], true)
- endif
+ config_h.set(header[0], cc.has_header(header[1]))
endforeach
# functions
@@ -97,9 +95,7 @@ if host_machine.system().contains('darwin')
endif
foreach func: check_functions
- if cc.has_function(func[1])
- config_h.set(func[0], true)
- endif
+ config_h.set(func[0], cc.has_function(func[1]))
endforeach
assert(cc.has_function('strerror'), '"strerror" not found')
@@ -161,17 +157,17 @@ glib_dep = dependency('glib-2.0', version: '>= 2.43.4')
gtk_dep = dependency('gtk+-3.0', version: '>= 3.21.6')
calendar_deps = [
- dependency('gmodule-export-2.0'),
- dependency('gio-2.0', version: '>= 2.43.4'),
glib_dep,
- dependency('goa-1.0', version: '>= 3.2.0'),
gtk_dep,
+ libical_dep,
+ dependency('gio-2.0', version: '>= 2.43.4'),
+ dependency('gmodule-export-2.0'),
+ dependency('goa-1.0', version: '>= 3.2.0'),
+ dependency('gsettings-desktop-schemas', version: '>= 3.21.2'),
dependency('libecal-1.2', version: '>= 3.13.90'),
dependency('libedataserver-1.2', version: '>= 3.17.1'),
dependency('libedataserverui-1.2', version: '>= 3.17.1'),
- libical_dep,
dependency('libsoup-2.4'),
- dependency('gsettings-desktop-schemas', version: '>= 3.21.2'),
cc.find_library('m')
]
@@ -193,7 +189,7 @@ subdir('data')
subdir('src')
subdir('po')
-if get_option('enable-gtk-doc')
+if enable_gtk_doc
subdir('doc/reference')
endif
@@ -208,5 +204,5 @@ output += ' Development options\n'
output += ' Enable Debug: .................... ' + calendar_debug.to_string() + '\n'
output += ' Enable Tracing: .................. ' + enable_tracing.to_string() + '\n'
output += ' Enable Documentation: ............ ' + enable_gtk_doc.to_string() + '\n\n'
-output += ' Now type "ninja -C ' + meson.build_root() + '" to build ' + meson.project_name() + '\n'
+output += ' Now type "ninja -C ' + meson.build_root() + '" to build ' + meson.project_name()
message(output)