-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmeson.build
124 lines (104 loc) · 3.48 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
project(
'wf-utils',
'cpp',
version: '0.4.0',
license: 'MIT',
meson_version: '>=0.50.0',
default_options: [
'cpp_std=c++17',
'warning_level=2',
'werror=false',
],
)
add_project_arguments(['-Wno-deprecated-declarations'], language: ['cpp'])
sources = [
'wayfire/action/action.cpp',
'wayfire/condition/condition.cpp',
'wayfire/condition/logic_condition.cpp',
'wayfire/condition/test_condition.cpp',
'wayfire/lexer/lexer.cpp',
'wayfire/lexer/literal.cpp',
'wayfire/lexer/symbol.cpp',
'wayfire/parser/action_parser.cpp',
'wayfire/parser/condition_parser.cpp',
'wayfire/parser/lambda_rule_parser.cpp',
'wayfire/parser/rule_parser.cpp',
'wayfire/rule/lambda_rule.cpp',
'wayfire/rule/rule.cpp',
'wayfire/variant.cpp',
]
wfutils_inc = include_directories('.')
lib_wfutils = library('wf-utils',
sources,
dependencies: [],
include_directories: wfutils_inc,
install: true,
version: meson.project_version())
pkgconfig = import('pkgconfig')
pkgconfig.generate(
libraries: lib_wfutils,
version: meson.project_version(),
filebase: meson.project_name(),
name: meson.project_name(),
description: 'Utilities library for Wayfire')
install_headers([], subdir: 'wayfire/utils')
wfutils = declare_dependency(link_with: lib_wfutils,
include_directories: wfutils_inc)
# -------------------------------------------------------------------------------------------------
# Install headers
headers_action = [
'wayfire/action/action.hpp',
'wayfire/action/action_interface.hpp',
]
headers_condition = [
'wayfire/condition/access_interface.hpp',
'wayfire/condition/condition.hpp',
'wayfire/condition/logic_condition.hpp',
'wayfire/condition/test_condition.hpp',
]
headers_lexer = [
'wayfire/lexer/lexer.hpp',
'wayfire/lexer/literal.hpp',
'wayfire/lexer/symbol.hpp',
]
headers_parser = [
'wayfire/parser/action_parser.hpp',
'wayfire/parser/condition_parser.hpp',
'wayfire/parser/rule_parser.hpp',
'wayfire/parser/lambda_rule_parser.hpp',
]
headers_rule = [
'wayfire/rule/lambda_rule.hpp',
'wayfire/rule/rule.hpp',
]
headers_root = [
'wayfire/utils.hpp',
'wayfire/variant.hpp',
]
install_headers(headers_action, subdir: 'wayfire/action')
install_headers(headers_condition, subdir: 'wayfire/condition')
install_headers(headers_lexer, subdir: 'wayfire/lexer')
install_headers(headers_parser, subdir: 'wayfire/parser')
install_headers(headers_rule, subdir: 'wayfire/rule')
install_headers(headers_root, subdir: 'wayfire')
# -------------------------------------------------------------------------------------------------
# Unit tests
#subdir('test')
# -------------------------------------------------------------------------------------------------
# Documentation
# TODO: Figure out how to install the doc package with meson.
doxygen = find_program('doxygen', required: false)
if doxygen.found()
cdata = configuration_data()
cdata.set('TOP_SRCDIR', meson.source_root())
cdata.set('TOP_BUILDDIR', meson.build_root())
cdata.set('OUTPUT_DIR', join_paths(meson.build_root(),'docs'))
cdata.set('README_PATH', join_paths(meson.source_root(),'README.md'))
cdata.set('VERSION', meson.project_version())
cdata.set('PROJECT_NAME', meson.project_name())
doxyfile = configure_file(input: 'Doxyfile.in',
output: 'Doxyfile',
configuration: cdata,
install: false)
doc_target = run_target('doc',command: [doxygen, doxyfile])
endif