-
Notifications
You must be signed in to change notification settings - Fork 19
/
meson.build
68 lines (56 loc) · 1.56 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
project(
'wf-config',
'cpp',
version: '0.10.0',
license: 'MIT',
meson_version: '>=0.47.0',
default_options: [
'cpp_std=c++17',
'warning_level=2',
'werror=false',
],
)
add_project_arguments(['-Wno-deprecated-declarations'], language: ['cpp'])
glm = dependency('glm', required: false)
if not glm.found() and not meson.get_compiler('cpp').check_header('glm/glm.hpp')
error('GLM not found, and directly using the header \'glm/glm.hpp\' is not possible.')
endif
evdev = dependency('libevdev')
libxml2 = dependency('libxml-2.0')
sources = [
'src/types.cpp',
'src/option.cpp',
'src/section.cpp',
'src/log.cpp',
'src/xml.cpp',
'src/config-manager.cpp',
'src/file.cpp',
'src/duration.cpp',
'src/compound-option.cpp',
]
wfconfig_inc = include_directories('include')
lib_wfconfig = library('wf-config',
sources,
dependencies: [evdev, glm, libxml2],
include_directories: wfconfig_inc,
install: true,
version: meson.project_version(),
soversion: '1')
pkgconfig = import('pkgconfig')
pkgconfig.generate(
libraries: lib_wfconfig,
version: meson.project_version(),
filebase: meson.project_name(),
name: meson.project_name(),
description: 'Dynamic file-based configuration library for Wayfire')
install_headers([], subdir: 'wayfire/config')
wfconfig = declare_dependency(link_with: lib_wfconfig,
include_directories: wfconfig_inc,
dependencies: glm)
# Install headers
subdir('include')
# Unit tests
doctest = dependency('doctest', required: get_option('tests'))
if doctest.found()
subdir('test')
endif