-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
71 lines (58 loc) · 1.96 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
project('echart', 'c', version : '0.0.1')
cc = meson.get_compiler('c')
### Library
dep_lib = [dependency('eina'),
dependency('evas'),
dependency('eina')]
src_lib = ['src/lib/Echart.h',
'src/lib/echart_chart.c',
'src/lib/echart_common.c',
'src/lib/echart_data.c',
'src/lib/echart_line.c',
'src/lib/echart_main.c',
'src/lib/echart_vbar.c',
'src/lib/echart_chart.h',
'src/lib/echart_common.h',
'src/lib/echart_data.h',
'src/lib/echart_line.h',
'src/lib/echart_vbar.h',
'src/lib/echart_private.h']
cflags = ['-Wall',
'-Wextra',
'-Wshadow',
'-Wdeclaration-after-statement',
'-Wmissing-prototypes',
'-Wstrict-prototypes',
'-Wpointer-arith',
'-Wno-missing-field-initializers']
cflags_lib = ['-DECHART_BUILD',
'-DHAVE_CONFIG_H',
cflags]
libm = cc.find_library('m', required : true)
dep_bin = shared_library('echart',
src_lib,
c_args : cflags_lib,
dependencies : [dep_lib, libm],
install : true)
### Binary
cflags_bin = [cflags]
inc_bin = include_directories('src/lib')
dep_bin = declare_dependency(link_with : dep_bin,
include_directories : inc_bin)
src_bin = ['src/bin/echart.c']
executable('echart',
src_bin,
c_args : cflags_bin,
dependencies : [dep_bin,
dependency('ecore-evas'),
dependency('ecore'),
dep_lib],
install : true)
### config.h
as_name = meson.project_name()
as_version = meson.project_version()
conf = configuration_data()
conf.set_quoted('VERSION', as_version)
conf.set_quoted('PACKAGE', as_name)
configure_file(output : 'config.h',
configuration : conf)