-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
60 lines (51 loc) · 1.24 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
project(
'quasar',
'c',
default_options : [
'c_std=c99',
'default_library=static',
'buildtype=release',
'optimization=3'
],
license : 'AGPL3',
version : '0.5'
)
bundle_name = 'quasar.lv2'
cc = meson.get_compiler('c')
add_global_arguments('-Wall', language: 'c')
add_global_arguments('-msse', language: 'c')
add_global_arguments('-mfpmath=sse', language: 'c')
m_dep = cc.find_library('m', required: false)
lv2_dep = dependency('lv2')
# Figure out install_dir
lv2dir = get_option('lv2dir')
if lv2dir == ''
prefix = get_option('prefix')
lv2dir = prefix / get_option('libdir') / 'lv2'
endif
bundle_install_dir = lv2dir / bundle_name
conf_data = configuration_data()
lib = shared_library(
'quasar',
'quasar.c',
dependencies : [lv2_dep, m_dep],
gnu_symbol_visibility : 'hidden',
install: true,
install_dir: bundle_install_dir,
name_prefix : ''
)
conf_data.set('CMAKE_SHARED_LIBRARY_SUFFIX', '.' + lib.full_path().split('.')[-1])
configure_file(
input : 'quasar.ttl',
output : 'quasar.ttl',
copy : true,
install : true,
install_dir : bundle_install_dir
)
configure_file(
input : 'manifest.ttl.in',
output : 'manifest.ttl',
configuration : conf_data,
install : true,
install_dir : bundle_install_dir
)