-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
57 lines (47 loc) · 1.11 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
project('miniaudio', 'c', version: '0.10.32')
compiler = meson.get_compiler('c')
c_flags = [
'-D_GNU_SOURCE',
]
link_deps = []
os_deps = []
if target_machine.system() == 'darwin'
os_deps += [
dependency('AudioToolbox'),
dependency('CoreAudio'),
dependency('CoreFoundation'),
]
endif
vorbis_decoder = get_option('vorbis')
if vorbis_decoder == 'libvorbis'
c_flags += ['-DUSE_OGGVORBIS']
link_deps = [
dependency('ogg'),
dependency('vorbis'),
]
elif vorbis_decoder == 'stb'
c_flags += ['-DUSE_STB_VORBIS']
endif
link_deps += [
dependency('tracy'),
]
incdirs = ['.', 'research']
sources = [
'miniaudio_engine.c',
]
incdirs = include_directories(incdirs)
lib = static_library(
'miniaudio',
sources,
c_args: c_flags,
include_directories: incdirs,
dependencies: link_deps + os_deps,
)
miniaudio_dep = declare_dependency(
include_directories: incdirs,
dependencies: link_deps + os_deps,
link_with: lib,
version: meson.project_version()
)
meson.override_dependency('miniaudio', miniaudio_dep)
# vim: set ts=4 sts=4 sw=4 et: