-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
53 lines (45 loc) · 1.09 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
project(
'barcalc',
'c', 'cpp',
version : '0.1.0',
license: 'BSD-3-Clause',
default_options : [
'c_std=c18',
'cpp_std=c++23',
'warning_level=3',
],
)
app_name = 'Barcalc'
app_id = 'dev.spitulax.' + app_name
cc = meson.get_compiler('c')
cxx = meson.get_compiler('cpp')
cpp_args = []
if get_option('buildtype').startswith('debug')
cpp_args += ['-Og', '-DDEBUG']
cpp_args += '-DRESOURCES_DIR="' + meson.project_source_root() / 'resources' + '"'
endif
cpp_args += '-DPROG_NAME="' + meson.project_name() + '"'
cpp_args += '-DPROG_VERSION="' + meson.project_version() + '"'
cpp_args += '-DAPP_NAME="' + app_name + '"'
cpp_args += '-DAPP_ID="' + app_id + '"'
cpp_args += ['-Wconversion', '-Wsign-conversion', '-Wpedantic']
cpp_args += ['-Wshadow', '-Wnon-virtual-dtor']
src = []
subdir('src')
if get_option('buildtype') == 'release'
subdir('resources')
endif
include = [
'src',
]
deps = [
dependency('gtkmm-4.0', include_type : 'system')
]
executable(
meson.project_name(),
src,
dependencies : deps,
include_directories : include,
install : true,
cpp_args : cpp_args,
)