-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeson.build
95 lines (71 loc) · 2.58 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
project('connman_proxy', 'c',
version : '1.0.0',
license: 'LGPL2+',
meson_version: '>=0.46'
)
compiler = meson.get_compiler('c')
###############
# Directories #
###############
top_srcdir = meson.source_root()
includedir = include_directories('include')
###################
# End Directories #
###################
##################
# Module Imports #
##################
gnome = import('gnome')
pkgconfig = import('pkgconfig')
######################
# End Module Imports #
######################
#########################
# External Dependencies #
#########################
gio_dep = dependency('gio-2.0', version : '>= 2.26.0')
gio_unix_dep = dependency('gio-unix-2.0', version : '>= 2.26.0')
pthread_deps = declare_dependency(link_args : '-lpthread')
#############################
# End External Dependencies #
#############################
###############################
# Compiler and Linker options #
###############################
connman_proxy_compiler_flag = ['-std=gnu99']
connman_proxy_compiler_flag += ['-rdynamic', '-fvisibility=hidden']
connman_proxy_compiler_flag += ['-Wall', '-Werror']
connman_proxy_compiler_flag += ['-Wfloat-equal', '-Wformat=2', '-Wunreachable-code', '-Wundef', '-Winline', '-Wconversion', '-Wswitch', '-Wcast-align', '-Wimplicit', '-Wmissing-prototypes', '-Wshadow']
connman_proxy_compiler_flag += ['-Wsign-conversion', '-Wimplicit-function-declaration', '-Wpointer-to-int-cast', '-Wint-to-pointer-cast']
if compiler.has_argument('-Wcast-function-type')
connman_proxy_compiler_flag += ['-Wcast-function-type']
endif
##### Developer Compiler flags #####
connman_proxy_compiler_flag += ['-g']
#connman_proxy_compiler_flag += ['-Wextra']
connman_proxy_compiler_flag += ['-DCONNMAN_LOG_LEVEL=CONN_LOG_INFO'] #Default Log level
connman_proxy_linker_flag = '-Wl,--as-needed'
add_project_arguments([connman_proxy_compiler_flag, connman_proxy_linker_flag], language : 'c')
###################################
# End compiler and Linker options #
###################################
#########
# Build #
#########
subdirs = [ 'dbus_xml', 'include', 'src', 'docs' ]
##### Conditional Builds #####
if get_option('examples')
subdirs += 'examples'
endif
foreach n : subdirs
subdir(n)
endforeach
#############
# End Build #
#############
pkgconfig.generate(libraries : connman_proxy,
version : meson.project_version(),
name : 'connmanproxy',
filebase : 'connmanproxy',
description : 'A Library to communicate with connman daemon',
subdirs : 'connman_proxy')