forked from extremscorner/libogc2
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
38 lines (32 loc) · 821 Bytes
/
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
project(
'libogc2',
['c'],
meson_version: '>=1.1',
)
external_project = import('unstable-external_project')
opt_level = get_option('optimization')
platform = get_option('platform')
libraries = get_option('libraries')
if libraries.length() == 0
error('Must specify libraries to build.')
endif
lib_args = []
foreach lib: libraries
lib_args += '--with-lib=' + lib
endforeach
p = external_project.add_project(
'configure',
configure_options: [
'--prefix=@PREFIX@',
'--libdir=@LIBDIR@',
'--incdir=@INCLUDEDIR@',
'--opt-level=' + opt_level,
'--with-platform=' + platform,
] + lib_args,
cross_configure_options: [],
)
deps = {}
foreach lib: libraries
dep = p.dependency(':' + platform + '/lib' + lib + '.a')
deps += {lib: dep}
endforeach