-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
66 lines (56 loc) · 1.31 KB
/
meson.build
File metadata and controls
66 lines (56 loc) · 1.31 KB
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
project(
'tgbot',
'c',
version: '0.1',
default_options: ['warning_level=3', 'c_std=c18'],
)
sources = []
subdir('src')
inc_dir = include_directories('include')
curl_dep = dependency('libcurl')
json_c_dep = dependency('json-c')
deps = [curl_dep, json_c_dep]
install_headers(
[
'include/methods.h',
'include/tg_types.h',
'include/tgbot.h',
'include/types.h',
],
subdir: 'tgbot',
)
tgbot_lib = static_library(
'tgbot',
sources,
dependencies: deps,
include_directories: inc_dir,
install: true,
)
tgbot_dep = declare_dependency(
link_with: tgbot_lib,
include_directories: inc_dir,
dependencies: deps,
)
cppcheck = find_program('cppcheck', required: false)
if cppcheck.found()
run_target(
'cppcheck',
command: [
cppcheck,
'--enable=all',
'--inconclusive',
'--std=c18',
'--check-level=exhaustive',
'--suppress=missingIncludeSystem',
'--project='
+ join_paths(meson.current_build_dir(), 'compile_commands.json'),
],
)
endif
# Example
executable(
'example',
'examples/sender/sendpic.c',
dependencies: tgbot_dep,
build_by_default: false,
)