-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
43 lines (37 loc) · 1.12 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
project('hello', 'c',
version : '1.0.0',
meson_version: '>= 0.49'
)
add_global_arguments('-DLIBEXECDIR="' + get_option('prefix') / get_option('libexecdir') + '"', language : 'c')
if host_machine.system() == 'windows'
add_global_arguments('-DEXEEXT=".exe' + '"', language : 'c')
else
add_global_arguments('-DEXEEXT=', language : 'c')
endif
hello = shared_library('hello',
files('libhello.c', 'libhello.h'),
install : true,
version : '1.0.0',
)
install_headers(files('libhello.h'))
executable('hello-world',
'hello-world.c',
install : true,
include_directories : include_directories('.'),
link_with : hello,
)
executable('head-libexec-world',
'head-libexec-world.c',
install : true,
include_directories : include_directories('.'),
)
install_data(files('shell-exec.py'),
'shell-exec.py',
install_dir : get_option('bindir'),
)
executable('libexec-world',
'libexec-world.c',
install : true,
include_directories : include_directories('.'),
install_dir : get_option('libexecdir') / meson.project_name(),
)