From 1786b476806564fc746533e0d875a4d7315effaa Mon Sep 17 00:00:00 2001 From: naxuroqa <naxuroqa@gmail.com> Date: Fri, 25 May 2018 17:29:07 +0200 Subject: [PATCH] VENOM-375: clean up meson.build * Add libgee dependency to readme (oops) * Clean up meson build files, add some info output --- README.md | 3 ++- meson.build | 8 +++++++- src/meson.build | 14 +++++++------- src/testing/meson.build | 2 ++ 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 57e1181..3e478e3 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,9 @@ Dependencies * `glib-2.0 >= 2.56` * `json-glib-1.0` * `libsoup-2.4` +* `libgee >= 0.20` * `sqlite3` -* `toxcore >= 0.2.2` +* `toxcore >= 0.2` Build-Dependencies ------------------ diff --git a/meson.build b/meson.build index a59c3e9..b2b2c35 100644 --- a/meson.build +++ b/meson.build @@ -5,9 +5,9 @@ project('venom', ['vala', 'c'], i18n = import('i18n') gnome = import('gnome') +valac = meson.get_compiler('vala') localedir = join_paths(get_option('prefix'), get_option('localedir')) -add_project_arguments('-DGETTEXT_PACKAGE="' + meson.project_name() + '"', language: 'c') conf_data = configuration_data() conf_data.set_quoted('VENOM_VERSION', meson.project_version()) @@ -19,3 +19,9 @@ subdir('data') subdir('po') subdir('src') subdir('src/testing') + +message('\n'.join(['', +' @0@-@1@'.format(meson.project_name(), meson.project_version()), +' prefix: @0@'.format(get_option('prefix')), +' buildtype: @0@'.format(get_option('buildtype')) +])) diff --git a/src/meson.build b/src/meson.build index 952c75b..1ccf13d 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,7 +1,7 @@ -root_source_dir = meson.current_source_dir() +vapi_dir = join_paths(meson.current_source_dir(), 'vapi') -add_project_arguments(['--vapidir', join_paths(meson.current_source_dir(), 'vapi')], - language: 'vala') +add_project_arguments(['--vapidir', vapi_dir], language: 'vala') +add_project_arguments('-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()), language: 'c') gtk_dep = dependency('gtk+-3.0') gdk_dep = dependency('gdk-3.0') @@ -14,17 +14,17 @@ json_dep = dependency('json-glib-1.0') soup_dep = dependency('libsoup-2.4') tox_dep = dependency('toxcore') gst_dep = dependency('gstreamer-1.0', required : false) -posix_dep = meson.get_compiler('vala').find_library('posix', required : false) +posix_dep = valac.find_library('posix', required : false) -config_vapi = meson.get_compiler('vala').find_library('config', dirs: join_paths(meson.current_source_dir(), 'vapi')) +config_vapi = valac.find_library('config', dirs: vapi_dir) config_dep = declare_dependency(dependencies: [config_vapi], include_directories : include_directories('.')) configure_file(output : 'config.h', configuration : conf_data) -venom_ui_resources = gnome.compile_resources( 'venom_ui_resources', 'ui/venom.gresource.xml', +venom_ui_resources = gnome.compile_resources('venom_ui_resources', 'ui/venom.gresource.xml', source_dir : 'ui', c_name : 'c_venom_ui_res') -venom_icons_resources = gnome.compile_resources( 'venom_icons_resources', 'icons/icons.gresource.xml', +venom_icons_resources = gnome.compile_resources('venom_icons_resources', 'icons/icons.gresource.xml', source_dir : 'icons', c_name : 'c_venom_icons_res') diff --git a/src/testing/meson.build b/src/testing/meson.build index 2b51b4b..e10f982 100644 --- a/src/testing/meson.build +++ b/src/testing/meson.build @@ -1,3 +1,5 @@ +root_source_dir = join_paths(meson.current_source_dir(), '..') + if posix_dep.found() executable('group_bot', ['GroupBot.vala', join_paths(root_source_dir, 'core/Tools.vala')],