-
Notifications
You must be signed in to change notification settings - Fork 1
/
meson.build
87 lines (75 loc) · 1.75 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
project(
'ftn2xml',
'cpp',
license : 'GPL-3.0-or-later',
default_options : ['buildtype=release', 'prefix=/usr']
)
prefix = get_option('prefix')
project_datadir = get_option('datadir') / meson.project_name()
project_docdir = get_option('datadir') / 'doc' / meson.project_name()
doc_readme = 'Readme.md'
doc_syntax = 'Fountain_Syntax.md'
pdf_export = get_option('pdf_export')
if not pdf_export.disabled()
podofo = dependency('libpodofo', required: pdf_export)
else
podofo = disabler()
endif
conf_data = configuration_data()
conf_data.set('version', meson.project_version())
conf_data.set('prefix', prefix)
conf_data.set('project_datadir', project_datadir)
conf_data.set10('pdf_export', podofo.found())
config_h = configure_file(
input: 'config.h.in',
output: 'config.h',
configuration: conf_data,
)
executable(
meson.project_name(),
sources: [
config_h,
'source/auxiliary.cxx',
'source/fountain.cxx',
'source/ftn2xml.cxx',
],
dependencies: [podofo],
name_prefix: '',
install: true,
install_dir: get_option('bindir'),
)
if meson.version().version_compare('>=0.61.0')
install_symlink(
'ftn2fdx',
install_dir: get_option('bindir'),
pointing_to: meson.project_name(),
)
install_symlink(
'ftn2html',
install_dir: get_option('bindir'),
pointing_to: meson.project_name(),
)
if (podofo.found())
install_symlink(
'ftn2pdf',
install_dir: get_option('bindir'),
pointing_to: meson.project_name(),
)
endif
endif
install_data(
sources: [
'data/fountain-html.css',
'data/fountain-xml.css',
'data/screenplain.css',
'data/textplay.css',
],
install_dir: project_datadir,
)
install_data(
sources: [
doc_syntax,
doc_readme,
],
install_dir: project_docdir,
)