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
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
29092fcfe6
commit
1b04e6f4f5
+9
-13
@@ -71,9 +71,7 @@ check_headers = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
foreach header: check_headers
|
foreach header: check_headers
|
||||||
if cc.has_header(header[1])
|
config_h.set(header[0], cc.has_header(header[1]))
|
||||||
config_h.set(header[0], true)
|
|
||||||
endif
|
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
# functions
|
# functions
|
||||||
@@ -97,9 +95,7 @@ if host_machine.system().contains('darwin')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
foreach func: check_functions
|
foreach func: check_functions
|
||||||
if cc.has_function(func[1])
|
config_h.set(func[0], cc.has_function(func[1]))
|
||||||
config_h.set(func[0], true)
|
|
||||||
endif
|
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
assert(cc.has_function('strerror'), '"strerror" not found')
|
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')
|
gtk_dep = dependency('gtk+-3.0', version: '>= 3.21.6')
|
||||||
|
|
||||||
calendar_deps = [
|
calendar_deps = [
|
||||||
dependency('gmodule-export-2.0'),
|
|
||||||
dependency('gio-2.0', version: '>= 2.43.4'),
|
|
||||||
glib_dep,
|
glib_dep,
|
||||||
dependency('goa-1.0', version: '>= 3.2.0'),
|
|
||||||
gtk_dep,
|
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('libecal-1.2', version: '>= 3.13.90'),
|
||||||
dependency('libedataserver-1.2', version: '>= 3.17.1'),
|
dependency('libedataserver-1.2', version: '>= 3.17.1'),
|
||||||
dependency('libedataserverui-1.2', version: '>= 3.17.1'),
|
dependency('libedataserverui-1.2', version: '>= 3.17.1'),
|
||||||
libical_dep,
|
|
||||||
dependency('libsoup-2.4'),
|
dependency('libsoup-2.4'),
|
||||||
dependency('gsettings-desktop-schemas', version: '>= 3.21.2'),
|
|
||||||
cc.find_library('m')
|
cc.find_library('m')
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -193,7 +189,7 @@ subdir('data')
|
|||||||
subdir('src')
|
subdir('src')
|
||||||
subdir('po')
|
subdir('po')
|
||||||
|
|
||||||
if get_option('enable-gtk-doc')
|
if enable_gtk_doc
|
||||||
subdir('doc/reference')
|
subdir('doc/reference')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -208,5 +204,5 @@ output += ' Development options\n'
|
|||||||
output += ' Enable Debug: .................... ' + calendar_debug.to_string() + '\n'
|
output += ' Enable Debug: .................... ' + calendar_debug.to_string() + '\n'
|
||||||
output += ' Enable Tracing: .................. ' + enable_tracing.to_string() + '\n'
|
output += ' Enable Tracing: .................. ' + enable_tracing.to_string() + '\n'
|
||||||
output += ' Enable Documentation: ............ ' + enable_gtk_doc.to_string() + '\n\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)
|
message(output)
|
||||||
|
|||||||
+2
-3
@@ -75,7 +75,7 @@ sources += gnome.gdbus_codegen(
|
|||||||
|
|
||||||
debug_conf = configuration_data()
|
debug_conf = configuration_data()
|
||||||
debug_conf.set('BUGREPORT_URL', package_bugreport)
|
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'
|
debug = 'gcal-debug.h'
|
||||||
|
|
||||||
@@ -108,6 +108,5 @@ libgcal = shared_library(
|
|||||||
|
|
||||||
libgcal_dep = declare_dependency(
|
libgcal_dep = declare_dependency(
|
||||||
link_with: libgcal,
|
link_with: libgcal,
|
||||||
include_directories: src_inc,
|
include_directories: src_inc
|
||||||
dependencies: calendar_deps
|
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user