-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
63 lines (52 loc) · 1.63 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
project(
'vs-templ',
['cpp'],
version: '0.3.1',
default_options: ['cpp_std=c++20'],
)
pugixml_proj = subproject('pugixml')
pugixml_dep = pugixml_proj.get_variable('pugixml_dep')
vs_templ_lib= library(
'vs-templ-lib',
[
'src/vs-templ.cpp',
'src/utils.cpp',
'src/symbols.cpp',
'src/logging.cpp'
],
dependencies: [pugixml_dep],
include_directories: ['include'],
install: true
)
vs_templ_cli= executable(
'vs.templ',
['src/app/main.cpp'],
dependencies: [pugixml_dep],
link_with: [vs_templ_lib],
include_directories: ['include'],
install: true
)
pandoc = find_program('pandoc', required: false)
if pandoc.found()
custom_target('vs-templ-man',command: 'man', output: 'vs-templ.1', input: './docs/manual.md', command:['pandoc','@INPUT@','-s','-t','man','-o','@OUTPUT@'], install: true, install_dir : join_paths(get_option('mandir'),'man1'))
endif
vs_templ_dep = declare_dependency(
link_with: vs_templ_lib,
include_directories: ['include'],
)
install_headers(
['include/vs-templ.hpp','include/logging.hpp','include/symbols.hpp','include/utils.hpp','include/module.modulemap'],
subdir : 'vs-templ'
)
#TODO: Add install for CLI and man pages.
pconf = import('pkgconfig')
pconf.generate(
vs_templ_lib,
description: 'Simple static template builder for XML files, inspired by XSLT',
url: 'https://github.com/KaruroChori/vs-templ',
)
#if get_option('tests')
# subdir('test')
# vs_templ_check = executable('vs-templ-check', test_sources, dependencies: pugixml_dep)
# test('vs-templ-check', pugixml_check, workdir: meson.current_source_dir())
#endif