2018-08-01 13:10:12 +00:00
|
|
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
|
|
#
|
2018-08-18 23:18:55 +00:00
|
|
|
# @software : pluie-yaml <https://git.pluie.org/pluie/lib-yaml>
|
|
|
|
# @version : 0.5
|
|
|
|
# @type : library
|
2018-08-01 13:10:12 +00:00
|
|
|
# @date : 2018
|
|
|
|
# @licence : GPLv3.0 <http://www.gnu.org/licenses/>
|
|
|
|
# @author : a-Sansara <[dev]at[pluie]dot[org]>
|
|
|
|
# @copyright : pluie.org <http://www.pluie.org/>
|
|
|
|
#
|
|
|
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
|
|
#
|
2018-08-18 23:18:55 +00:00
|
|
|
# This file is part of pluie-yaml.
|
2018-08-01 13:10:12 +00:00
|
|
|
#
|
|
|
|
# lib-yaml is free software (free as in speech) : you can redistribute it
|
|
|
|
# and/or modify it under the terms of the GNU General Public License as
|
|
|
|
# published by the Free Software Foundation, either version 3 of the License,
|
|
|
|
# or (at your option) any later version.
|
|
|
|
#
|
2018-08-18 23:18:55 +00:00
|
|
|
# pluie-yaml is distributed in the hope that it will be useful, but WITHOUT
|
2018-08-01 13:10:12 +00:00
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
# more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2018-08-18 23:18:55 +00:00
|
|
|
# along with pluie-yaml. If not, see <http://www.gnu.org/licenses/>.
|
2018-08-01 13:10:12 +00:00
|
|
|
#
|
|
|
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
|
|
#
|
2018-08-19 21:15:24 +00:00
|
|
|
project('pluie-yaml', 'vala', 'c', version:'0.5')
|
2018-07-30 16:25:03 +00:00
|
|
|
|
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
dep_glib = dependency('glib-2.0')
|
|
|
|
dep_gobject = dependency('gobject-2.0')
|
2018-08-10 00:12:08 +00:00
|
|
|
dep_gmodule = dependency('gmodule-2.0')
|
2018-07-30 16:25:03 +00:00
|
|
|
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')
|
|
|
|
|
2018-08-19 21:15:24 +00:00
|
|
|
version = meson.project_version()
|
2018-07-30 16:25:03 +00:00
|
|
|
bindir = join_paths(get_option('prefix'), get_option('bindir'))
|
2018-08-07 18:14:38 +00:00
|
|
|
datadir = join_paths(get_option('prefix'), get_option('datadir'), 'pluie/yaml')
|
2018-07-30 16:25:03 +00:00
|
|
|
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
|
|
|
|
)
|
|
|
|
|
2018-08-01 12:20:55 +00:00
|
|
|
sources = [
|
2018-07-30 16:25:03 +00:00
|
|
|
'build/install.vala',
|
|
|
|
'src/vala/Pluie/Io.Reader.vala',
|
|
|
|
'src/vala/Pluie/Io.StreamLineMark.vala',
|
|
|
|
'src/vala/Pluie/Yaml.global.vala',
|
2018-08-05 13:18:25 +00:00
|
|
|
'src/vala/Pluie/Yaml.AbstractChild.vala',
|
|
|
|
'src/vala/Pluie/Yaml.AbstractNode.vala',
|
2018-08-18 21:01:07 +00:00
|
|
|
'src/vala/Pluie/Yaml.Builder.vala',
|
2018-08-05 13:18:25 +00:00
|
|
|
'src/vala/Pluie/Yaml.Collection.vala',
|
2018-08-01 15:49:01 +00:00
|
|
|
'src/vala/Pluie/Yaml.Config.vala',
|
2018-07-30 16:25:03 +00:00
|
|
|
'src/vala/Pluie/Yaml.Event.vala',
|
2018-08-09 01:42:36 +00:00
|
|
|
'src/vala/Pluie/Yaml.Example.vala',
|
2018-08-18 21:01:07 +00:00
|
|
|
'src/vala/Pluie/Yaml.ExampleChild.vala',
|
|
|
|
'src/vala/Pluie/Yaml.ExampleStruct.vala',
|
2018-08-01 14:44:07 +00:00
|
|
|
'src/vala/Pluie/Yaml.Finder.vala',
|
2018-08-05 13:18:25 +00:00
|
|
|
'src/vala/Pluie/Yaml.Loader.vala',
|
|
|
|
'src/vala/Pluie/Yaml.Mapping.vala',
|
|
|
|
'src/vala/Pluie/Yaml.Node.vala',
|
2018-08-08 16:01:10 +00:00
|
|
|
'src/vala/Pluie/Yaml.Object.vala',
|
2018-08-09 01:42:36 +00:00
|
|
|
'src/vala/Pluie/Yaml.Processor.vala',
|
2018-08-18 21:01:07 +00:00
|
|
|
'src/vala/Pluie/Yaml.Register.vala',
|
2018-08-11 00:28:19 +00:00
|
|
|
'src/vala/Pluie/Yaml.Root.vala',
|
2018-08-05 13:18:25 +00:00
|
|
|
'src/vala/Pluie/Yaml.Scalar.vala',
|
2018-07-31 16:42:49 +00:00
|
|
|
'src/vala/Pluie/Yaml.Scanner.vala',
|
2018-08-05 13:18:25 +00:00
|
|
|
'src/vala/Pluie/Yaml.Sequence.vala',
|
2018-08-09 01:42:36 +00:00
|
|
|
'src/vala/Pluie/Yaml.Tag.vala',
|
2018-07-30 16:25:03 +00:00
|
|
|
'src/c/yaml.c'
|
|
|
|
]
|
|
|
|
|
2018-08-07 18:14:38 +00:00
|
|
|
install_data('resources/main.yml', install_dir : datadir)
|
2018-08-09 01:42:36 +00:00
|
|
|
install_data('resources/tag.yml', install_dir : datadir)
|
2018-07-30 16:25:03 +00:00
|
|
|
install_data('resources/test.yml', install_dir : datadir)
|
2018-08-07 18:14:38 +00:00
|
|
|
install_data('resources/test.json', install_dir : datadir)
|
|
|
|
install_data('resources/config/db.yml', install_dir : join_paths(datadir, 'config'))
|
|
|
|
install_data('resources/config/subdir/test.yml', install_dir : join_paths(datadir, 'config/subdir'))
|
2018-07-30 16:25:03 +00:00
|
|
|
|
|
|
|
libpluie_yaml = library(
|
|
|
|
'pluie-yaml-' + version,
|
|
|
|
sources,
|
|
|
|
vala_header : 'pluie_yaml.h',
|
|
|
|
vala_vapi : 'pluie-yaml-' +version+'.vapi',
|
2018-08-10 00:12:08 +00:00
|
|
|
dependencies : [dep_glib, dep_gobject, dep_gmodule, dep_gio, dep_gee, dep_echo, dep_m, dep_yaml],
|
2018-07-30 16:25:03 +00:00
|
|
|
install : true,
|
2018-08-14 00:35:38 +00:00
|
|
|
version : version,
|
2018-07-30 16:25:03 +00:00
|
|
|
install_dir : [get_option('libdir'), incdir, true]
|
|
|
|
)
|
|
|
|
|
|
|
|
pkgconfig = import('pkgconfig')
|
|
|
|
pkgconfig.generate(
|
|
|
|
libraries : libpluie_yaml,
|
2018-08-10 00:12:08 +00:00
|
|
|
requires : 'glib-2.0 gmodule-2.0 gobject-2.0 gio-2.0 gee-0.8 pluie-echo-0.2',
|
2018-07-30 16:25:03 +00:00
|
|
|
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'
|
|
|
|
)
|
|
|
|
|
|
|
|
|