pluie-yaml/meson.build

74 lines
2.4 KiB
Meson
Raw Normal View History

2018-07-30 16:25:03 +00:00
project('libpluie-yaml', 'vala', 'c')
cc = meson.get_compiler('c')
dep_glib = dependency('glib-2.0')
dep_gobject = dependency('gobject-2.0')
dep_gio = dependency('gio-2.0')
dep_gee = dependency('gee-0.8')
dep_echo = dependency('pluie-echo-0.2')
dep_m = cc.find_library('m', required : false)
dep_yaml = cc.find_library('yaml', required : true)
#~ add_global_link_arguments('-lyaml', language : 'c')
version = '0.3'
bindir = join_paths(get_option('prefix'), get_option('bindir'))
datadir = join_paths(get_option('prefix'), get_option('datadir'), 'pluie')
libdir = join_paths(get_option('prefix'), get_option('libdir'), 'pkgconfig')
incdir = join_paths(get_option('prefix'), get_option('includedir'), 'pluie')
conf = configuration_data()
conf.set('VERSION' , version)
conf.set('INSTALL_PATH', bindir)
conf.set('DATA_PATH' , datadir)
configure_file(
input: 'install.vala.in',
output: 'install.vala',
configuration: conf
)
sources = [
'build/install.vala',
'src/vala/Pluie/Io.Reader.vala',
'src/vala/Pluie/Io.StreamLineMark.vala',
'src/vala/Pluie/Yaml.global.vala',
'src/vala/Pluie/Yaml.Event.vala',
'src/vala/Pluie/Yaml.Processor.vala',
'src/vala/Pluie/Yaml.BaseNode.vala',
'src/vala/Pluie/Yaml.Node.vala',
'src/vala/Pluie/Yaml.NodeCollection.vala',
'src/vala/Pluie/Yaml.NodeMap.vala',
'src/vala/Pluie/Yaml.NodeRoot.vala',
'src/vala/Pluie/Yaml.NodeScalar.vala',
'src/vala/Pluie/Yaml.NodeSequence.vala',
'src/vala/Pluie/Yaml.NodeSinglePair.vala',
'src/c/yaml.c'
]
install_data('resources/test.yml', install_dir : datadir)
libpluie_yaml = library(
'pluie-yaml-' + version,
sources,
vala_header : 'pluie_yaml.h',
vala_vapi : 'pluie-yaml-' +version+'.vapi',
dependencies : [dep_glib, dep_gobject, dep_gio, dep_gee, dep_echo, dep_m, dep_yaml],
install : true,
install_dir : [get_option('libdir'), incdir, true]
)
pkgconfig = import('pkgconfig')
pkgconfig.generate(
libraries : libpluie_yaml,
requires : 'glib-2.0 gobject-2.0 gio-2.0 gee-0.8 pluie-echo-0.2',
variables : 'datarootdir='+join_paths('${prefix}', get_option('datadir'))+'\ndatadir='+join_paths('${datarootdir}', 'pluie'),
version : version,
name : 'libpluie-yaml',
filebase : 'pluie-yaml-' + version,
subdirs : 'pluie',
description : 'The pluie yaml library'
)