-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
39 lines (34 loc) · 1.15 KB
/
meson.build
File metadata and controls
39 lines (34 loc) · 1.15 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
project(
'libdnf5-plugin-snapper', 'cpp',
version : '0.2.0',
default_options : ['warning_level=3', 'cpp_std=c++20']
)
project_version_list = meson.project_version().split('.')
libdnf5_dep = dependency('libdnf5')
snapper_lib = meson.get_compiler('cpp').find_library('snapper')
snapper_inc = meson.get_compiler('cpp').check_header('snapper/Snapper.h', required: true)
conf_data = configuration_data()
conf_data.set('VERSION_MAJOR', project_version_list[0])
conf_data.set('VERSION_MINOR', project_version_list[1])
conf_data.set('VERSION_MICRO', project_version_list[2])
conf_data.set('DEFAULT_PROTECTED_ARE_IMPORTANT', 'true')
conf_data.set('DEFAULT_INSTALLONLY_ARE_IMPORTANT', 'true')
configure_file(output: 'config.hpp', configuration: conf_data)
configure_file(
input: 'config/snapper.conf.in',
output: 'snapper.conf',
configuration: conf_data,
install_dir: join_paths(get_option('sysconfdir'), 'dnf', 'libdnf5-plugins'),
install: true
)
shared_library(
'snapper',
'src/snapper.cpp',
name_prefix: '',
dependencies : [
libdnf5_dep,
snapper_lib
],
install_dir: join_paths(get_option('libdir'), 'libdnf5', 'plugins'),
install : true
)