-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
68 lines (57 loc) · 1.93 KB
/
meson.build
File metadata and controls
68 lines (57 loc) · 1.93 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
67
68
project(
'pepv',
'c',
'cpp',
default_options: ['c_std=c18', 'cpp_std=c++20'],
meson_version: '>=1.1',
)
# TODO: Add versioning
if get_option('buildtype') == 'debug'
add_project_arguments('-DDEBUG', language: 'cpp')
endif
threads = dependency('threads')
gtk = dependency('gtk+-3.0')
libalpm = dependency('libalpm')
tracy = dependency('tracy')
message('prefix: ' + get_option('prefix'))
message('datadir: ' + get_option('datadir'))
message('buildtype: ' + get_option('buildtype'))
if get_option('tracy_enable') and get_option('buildtype') != 'debugoptimized'
warning('Profiling builds should set -- buildtype = debugoptimized')
endif
executable(
'pepv',
['src/events.cpp', 'src/main.cpp', 'src/pkgs.cpp', 'src/utils.cpp'],
dependencies: [threads, gtk, libalpm, tracy],
export_dynamic: true, # GTK needs this
cpp_args: [
'-DPROJECTNAME="' + meson.project_name() + '"',
'-DPREFIX="' + get_option('prefix') + '"',
'-DDATADIR="' + get_option('datadir') + '"',
'-Werror',
],
install: true,
)
install_data('data/pepv.ui')
install_data(
'data/pepv.desktop',
install_dir: get_option('prefix') / get_option('datadir') / 'applications',
)
install_data(
'README.md',
install_dir: get_option('prefix') / get_option('datadir') / 'doc' / meson.project_name(),
)
install_data(
'LICENSE',
rename: 'COPYING',
install_dir: get_option('prefix') / get_option('datadir') / 'licenses' / meson.project_name(),
)
# TODO: better install dir for this to make desktop and gtk icons work on debug builds/uninstalled tests
foreach size : [16, 22, 24, 32, 36, 48, 64, 72, 96, 128, 256, 512, 1024]
install_data(
'data/icons/sizes/pepv-@[email protected]'.format(size),
install_dir: get_option('prefix') / get_option('datadir') / 'icons/hicolor/@0@x@0@/apps/'.format(size),
rename: meson.project_name() + '.png',
install_mode: 'rw-r--r--',
)
endforeach