[gnome-calendar] project: Minor meson improvements.
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] project: Minor meson improvements.
- Date: Sat, 19 Aug 2017 02:08:27 +0000 (UTC)
commit 1b04e6f4f5bb40c16dcb6f2477460689034aec0b
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Fri Aug 18 20:42:38 2017 +0200
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
meson.build | 22 +++++++++-------------
src/meson.build | 5 ++---
2 files changed, 11 insertions(+), 16 deletions(-)
---
diff --git a/meson.build b/meson.build
index b3d3e3c..b21f80e 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)
diff --git a/src/meson.build b/src/meson.build
index e19cb2c..a6e4255 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -75,7 +75,7 @@ sources += gnome.gdbus_codegen(
debug_conf = configuration_data()
debug_conf.set('BUGREPORT_URL', package_bugreport)
-debug_conf.set('ENABLE_TRACING', (enable_tracing ? 1 : 0))
+debug_conf.set10('ENABLE_TRACING', enable_tracing)
debug = 'gcal-debug.h'
@@ -108,6 +108,5 @@ libgcal = shared_library(
libgcal_dep = declare_dependency(
link_with: libgcal,
- include_directories: src_inc,
- dependencies: calendar_deps
+ include_directories: src_inc
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]