-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmeson.build
50 lines (42 loc) · 1.42 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
project('libch341a', 'c',
license : 'GPLv2',
default_options: ['c_std=c99'])
cc = meson.get_compiler('c')
cflags = cc.get_supported_arguments([
'-Wall',
'-Werror=incompatible-pointer-types',
'-Werror=implicit-function-declaration',
'-Werror=format-security'
])
add_project_arguments(cflags, language: 'c')
add_project_arguments('-D_GNU_SOURCE', language: 'c')
# Find dgpc. This should never be an installed library
libdgpc_proj = subproject('libdgpc')
libdgpc_dep = libdgpc_proj.get_variable('libdgpc_dep')
log_macros_tmpl = libdgpc_proj.get_variable('log_macros_tmpl')
# Find libusrio
libusrio_dep = dependency('libusrio', required : false)
if not libusrio_dep.found()
libusrio_proj = subproject('libusrio')
libusrio_dep = libusrio_proj.get_variable('libusrio_dep')
endif
# Find libebogroll
libebogroll_dep = dependency('libebogroll', required : false)
if not libebogroll_dep.found()
libebogroll_proj = subproject('libebogroll')
libebogroll_dep = libebogroll_proj.get_variable('libebogroll_dep')
endif
inc = include_directories('include')
subdir('include')
subdir('src')
subdir('examples')
libch341a_dep = declare_dependency(
include_directories : inc,
link_with : libch341a)
pkg_mod = import('pkgconfig')
pkg_mod.generate(
libraries : libch341a,
version : '0',
name : 'libch341a',
filebase : 'libch341a',
description : 'Library to use the WCH ch341a to do stuff')