forked from wwmm/easyeffects
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
109 lines (90 loc) · 2.95 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
project(
'easyeffects',
'c',
'cpp',
default_options : [
'cpp_std=c++20',
'buildtype=debugoptimized',
# 1: -Wall
# 2: -Wall -Wextra
# 3: -Wall -Wextra -Wpedantic
'warning_level=2'
],
license: 'GPL-3-or-later',
version: '7.1.8',
meson_version: '>= 0.60.0'
)
# see https://github.com/wwmm/easyeffects/pull/1739 for more info
cxx = meson.get_compiler('cpp')
if cxx.get_id() == 'clang' and not cxx.version().version_compare('>=16.0.0')
error('This project only supports gcc or > clang 16 compilers due to usage of c++20 features.')
endif
suppressed_warnings = [
'-Wno-missing-field-initializers',
'-Wno-unused-parameter'
]
add_project_arguments (
suppressed_warnings,
language: [ 'c', 'cpp' ],
)
add_project_arguments('-DG_LOG_DOMAIN="easyeffects"', language : [ 'c', 'cpp' ])
add_project_arguments('-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()),
language:'c')
gnome_mod = import('gnome')
i18n_mod = import('i18n')
prefix = get_option('prefix')
bindir = join_paths(prefix, get_option('bindir'))
libdir = join_paths(prefix, get_option('libdir'))
datadir = join_paths(prefix, get_option('datadir'))
localedir = join_paths(prefix, get_option('localedir'))
include_dir = include_directories('include')
config_h_dir = include_directories('.')
status = []
if get_option('devel')
status += 'Using development build mode with .Devel appended to the application ID.'
app_id_suffix = '.Devel'
name_suffix = ' (Devel)'
else
status += 'Using stable build mode with the standard application ID'
app_id_suffix = ''
name_suffix = ''
endif
if get_option('enable-mold')
# mold 1.11.0 or later needed due to https://github.com/rui314/mold/issues/1017
status += 'Using mold linker, so make sure mold 1.11.0 or later is installed on your system.'
# --no-as-needed temporarily necessary due to the seeming return of https://github.com/rui314/mold/issues/1017
link_args = ['-fuse-ld=mold', '-Wl,--no-as-needed']
else
link_args = []
endif
app_id = 'com.github.wwmm.easyeffects@0@'.format(app_id_suffix)
# Configuration for application itself at compile time, such as debug info like the commit that was built
conf = configuration_data()
conf.set10('IS_DEVEL_BUILD', get_option('devel'))
conf.set_quoted('APP_NAME', 'Easy Effects' + name_suffix)
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
conf.set_quoted('LOCALE_DIR', localedir)
conf.set_quoted('LIB_DIR', libdir)
conf.set_quoted('VERSION', meson.project_version())
conf.set('COMMIT_DESC', '"@VCS_TAG@"')
config_h = declare_dependency(
sources: vcs_tag(
command: ['git', 'rev-parse', '--short', 'HEAD'],
fallback: 'Could not find commit of build',
input: configure_file(
output: 'config.h.in',
configuration: conf
),
output: 'config.h'
)
)
subdir('data')
subdir('po')
subdir('help')
subdir('src')
gnome_mod.post_install(
glib_compile_schemas: true,
gtk_update_icon_cache: true,
update_desktop_database: true,
)
message('\n '.join(status))