-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
meson.build
85 lines (76 loc) · 1.55 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
project(
'albafetch',
'c',
version : '4.1',
default_options : ['warning_level=3'],
license : 'MIT'
)
src = [
'src/queue.c',
'src/utils.c',
'src/info/bios.c',
'src/info/colors.c',
'src/info/cpu.c',
'src/info/date.c',
'src/info/desktop.c',
'src/info/gpu.c',
'src/info/gtk_theme.c',
'src/info/icon_theme.c',
'src/info/cursor_theme.c',
'src/info/host.c',
'src/info/hostname.c',
'src/info/info.h',
'src/info/kernel.c',
'src/info/light_colors.c',
'src/info/local_ip.c',
'src/info/login_shell.c',
'src/info/memory.c',
'src/info/os.c',
'src/info/packages.c',
'src/info/public_ip.c',
'src/info/pwd.c',
'src/info/shell.c',
'src/info/term.c',
'src/info/uptime.c',
'src/info/user.c',
]
src_debug = ['src/debug.c']
src_debug += src
src += 'src/main.c'
project_dependencies = []
if host_machine.system() == 'linux'
project_dependencies += dependency('libpci', method: 'pkg-config')
endif
if host_machine.system() == 'darwin'
project_dependencies += dependency('appleframeworks', modules : ['foundation', 'iokit'])
add_languages('objc')
src += [
'src/macos_infos.c',
'src/bsdwrap.c',
'src/macos_gpu_string.m',
]
src_debug += [
'src/macos_infos.c',
'src/bsdwrap.c',
'src/macos_gpu_string.m',
]
endif
build_args = [
'-Wall',
'-Wextra',
'-Ofast',
]
executable(
meson.project_name(),
src,
dependencies : project_dependencies,
install : true,
c_args : build_args
)
executable(
'debug',
src_debug,
dependencies : project_dependencies,
install : false,
c_args : build_args
)