diff options
author | David Robillard <d@drobilla.net> | 2022-01-13 18:35:57 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-28 21:57:29 -0500 |
commit | a9f6180de5124f699963bd007daa810868f2c75a (patch) | |
tree | 899c2ef9a46cda6174f1f9ea4f4c9dff4a16e4c7 | |
parent | f93a441065a611cc32874dde67e53a8295c87baf (diff) | |
download | serd-a9f6180de5124f699963bd007daa810868f2c75a.tar.gz serd-a9f6180de5124f699963bd007daa810868f2c75a.tar.bz2 serd-a9f6180de5124f699963bd007daa810868f2c75a.zip |
WIP
-rw-r--r-- | meson.build | 39 | ||||
-rw-r--r-- | tools/meson.build | 2 |
2 files changed, 36 insertions, 5 deletions
diff --git a/meson.build b/meson.build index 0620db02..63a9ece5 100644 --- a/meson.build +++ b/meson.build @@ -87,7 +87,7 @@ c_headers = ['include/serd/serd.h'] c_header_files = files(c_headers) c_header = files('include/serd/serd.h') -sources = [ +serd_sources = [ 'src/block_dumper.c', 'src/buffer.c', 'src/byte_source.c', @@ -119,12 +119,15 @@ sources = [ 'src/syntax.c', 'src/system.c', 'src/uri.c', - 'src/validate.c', 'src/value.c', 'src/world.c', 'src/writer.c', ] +serd_validator_sources = [ + 'src/validate.c', +] + # System libraries m_dep = cc.find_library('m', required: false) @@ -186,13 +189,16 @@ rerex_dep = dependency('rerex-0', fallback: ['rerex', 'rerex_dep']) # Build shared and/or static library/libraries + +# Main library + libserd = build_target( library_name, - sources, + serd_sources, version: meson.project_version(), include_directories: include_directories('include', 'src'), c_args: c_warnings + platform_args + library_args, - dependencies: [exess_dep, m_dep, rerex_dep, zix_dep], + dependencies: [exess_dep, m_dep, zix_dep], gnu_symbol_visibility: 'hidden', install: true, target_type: library_type) @@ -209,6 +215,31 @@ pkg.generate( version: meson.project_version(), description: 'A lightweight library for working with RDF') +# Validator library + +libserd_validator = build_target( + 'serd_validator' + version_suffix, + serd_validator_sources, + version: meson.project_version(), + include_directories: include_directories('include', 'src'), + c_args: c_warnings + platform_args + library_args, + dependencies: [exess_dep, rerex_dep, serd_dep], + gnu_symbol_visibility: 'hidden', + install: true, + target_type: library_type) + +serd_validator_dep = declare_dependency( + include_directories: include_directories(['include']), + link_with: libserd_validator) + +pkg.generate( + libserd_validator, + name: 'Serd Validator', + filebase: 'serd_validator' + version_suffix, + subdirs: [versioned_name], + version: meson.project_version(), + description: 'RDF validation support in Serd') + # Build command line tools if get_option('tools') subdir('tools') diff --git a/tools/meson.build b/tools/meson.build index da29c6dc..13e18c1d 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -31,4 +31,4 @@ serd_validate = executable('serd-validate', c_args: tool_c_args, link_args: tool_link_args, install: true, - dependencies: serd_dep) + dependencies: [serd_dep, serd_validator_dep]) |