forked from weserv/images
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
50 lines (41 loc) · 1.52 KB
/
meson.build
File metadata and controls
50 lines (41 loc) · 1.52 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
project('weserv', 'cpp',
version: '5.0.0',
meson_version: '>=0.63',
license: 'BSD-3-Clause',
default_options: [
# We use C++17 features
'cpp_std=c++17',
# Do a release (optimized) build by default
'buildtype=release',
# Turn off asserts etc. in release mode
'b_ndebug=if-release',
],
)
library_version = meson.project_version()
pkg = import('pkgconfig')
# If we're optimizing (e.g. release mode) we turn off cast checks and g_asserts
if get_option('optimization') not in ['0', 'g']
add_project_arguments('-DG_DISABLE_CAST_CHECKS', language: 'cpp')
add_project_arguments('-DG_DISABLE_CHECKS', language: 'cpp')
add_project_arguments('-DG_DISABLE_ASSERT', language: 'cpp')
endif
cpp = meson.get_compiler('cpp')
if get_option('b_coverage')
# Use absolute paths to make coverage reports more reliable
add_project_arguments(cpp.get_supported_arguments('-fprofile-abs-path'), language: 'cpp')
endif
vips_dep = dependency('vips-cpp', version: '>=8.12.0')
summary('Compiler', cpp.get_id(), section: 'Toolchain')
summary('Linker', cpp.get_linker_id(), section: 'Toolchain')
summary('Debugging', get_option('debug'), section: 'Build')
summary('Optimization', get_option('optimization'), section: 'Build')
summary('CLI utility', get_option('cli'), section: 'Build')
summary('Tests', get_option('tests'), section: 'Build')
subdir('include/weserv')
subdir('src/api')
if get_option('cli')
subdir('src/tools')
endif
if get_option('tests')
subdir('test/api')
endif