...
 
Commits (3)
manpages = files(
'vala-gen-introspect.1',
'valac.1',
'valadoc.1',
'vapigen.1',
)
install_man(manpages)
# https://github.com/mesonbuild/meson/issues/1602
meson.add_install_script('sh', '-c', 'cd $DESTDIR@0@/man1; ln -fs --relative vala-gen-introspect.1 @1@'.format(join_paths(get_option('prefix'), get_option('mandir')), 'vala-gen-introspect@0@.1'.format(vala_version_suffix)))
meson.add_install_script('sh', '-c', 'cd $DESTDIR@0@/man1; ln -fs --relative valac.1 @1@'.format(join_paths(get_option('prefix'), get_option('mandir')), 'valac@0@.1'.format(vala_version_suffix)))
meson.add_install_script('sh', '-c', 'cd $DESTDIR@0@/man1; ln -fs --relative valadoc.1 @1@'.format(join_paths(get_option('prefix'), get_option('mandir')), 'valadoc@0@.1'.format(vala_version_suffix)))
meson.add_install_script('sh', '-c', 'cd $DESTDIR@0@/man1; ln -fs --relative vapigen.1 @1@'.format(join_paths(get_option('prefix'), get_option('mandir')), 'vapigen@0@.1'.format(vala_version_suffix)))
if valadoc_enabled
manpages += files('valadoc.1')
meson.add_install_script('sh', '-c', 'cd $DESTDIR@0@/man1; ln -fs --relative valadoc.1 @1@'.format(join_paths(get_option('prefix'), get_option('mandir')), 'valadoc@0@.1'.format(vala_version_suffix)))
endif
install_man(manpages)
......@@ -5,6 +5,8 @@ project('vala',
license: 'LGPL2.1'
)
cc = meson.get_compiler('c')
vala_version = meson.project_version()
version_array = vala_version.split('.')
vala_api_version = '0.44'
......@@ -101,14 +103,15 @@ add_project_arguments([
glib_version_required = '2.40.0'
libgvc_version_required = '2.16'
valadoc_enabled = get_option('valadoc')
glib_dep = dependency('glib-2.0', version: '>= @0@'.format(glib_version_required))
gobject_dep = dependency('gobject-2.0', version: '>= @0@'.format(glib_version_required))
gmodule_dep = dependency('gmodule-2.0', version: '>= @0@'.format(glib_version_required))
libgvc_dep = dependency('libgvc', version: '>= @0@'.format(libgvc_version_required))
libgvc_dep = dependency('libgvc', version: '>= @0@'.format(libgvc_version_required), required: valadoc_enabled)
# Check for CGraph support of libgvc
cc = meson.get_compiler('c')
if cc.run('''#include <gvc.h>
if valadoc_enabled and cc.run('''#include <gvc.h>
int main(void) {
#ifdef WITH_CGRAPH
return 0;
......@@ -127,25 +130,28 @@ subdir('ccode')
subdir('codegen')
subdir('compiler')
subdir('vapigen')
subdir('libvaladoc')
subdir('valadoc')
subdir('vapi')
subdir('doc')
subdir('tests')
if valadoc_enabled
subdir('libvaladoc')
subdir('valadoc')
endif
install_data('vala.m4', install_dir: join_paths('share', 'aclocal'))
pycat = find_program(join_paths(meson.source_root(), 'build-aux', 'meson', 'cat.py'))
#custom_target(
# 'libvala@0@.vapi'.format(vala_version_suffix),
# command: [pycat, '@INPUT@'],
# depends: [valagee_lib, valacore_lib],
# capture: true,
# install: true,
# install_dir: join_paths('share', 'vala', 'vapi'),
# input: [
# join_paths(meson.current_build_dir(), 'gee', 'gee.vapi'),
# join_paths(meson.current_build_dir(), 'vala', 'vala.vapi'),
# ],
# output: 'libvala@0@.vapi'.format(vala_version_suffix),
#)
custom_target(
'libvala@0@.vapi'.format(vala_version_suffix),
command: [
pycat,
join_paths(meson.current_build_dir(), 'gee', 'gee.vapi'),
join_paths(meson.current_build_dir(), 'vala', 'vala.vapi'),
],
depends: [valagee_lib, valacore_lib],
capture: true,
install: true,
install_dir: join_paths('share', 'vala', 'vapi'),
output: 'libvala@0@.vapi'.format(vala_version_suffix),
)
# Optional dependencies
option('valadoc', type: 'boolean', value : 'true',
description : 'Enable build of libvaladoc and valadoc')
# Documentation
option('documentation', type: 'boolean', value: 'false',
description : 'Build API reference and tools documentation')
option('man-pages', type: 'boolean', value: 'false',
description : 'Build man pages for installed tools')
......@@ -694,6 +694,7 @@ vala_flags = [
'--pkg', 'gio-2.0',
'--disable-warnings',
'--main', 'main', '--save-temps',
'--cc', cc.cmd_array()[-1],
'-X', '-g',
'-X', '-O0',
'-X', '-pipe',
......@@ -701,7 +702,6 @@ vala_flags = [
'-X', '-DGETTEXT_PACKAGE="valac"',
]
cc = meson.get_compiler('c')
if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
test_cflags = [
'-Werror=init-self',
......