diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2018-08-12 15:26:29 +0200 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2018-10-02 17:22:50 +0200 |
commit | 46d464e5bfc10398461a33a2256c1c58d509dd1a (patch) | |
tree | 8c1a9272c05f14033a4430bc122632461bd73608 /src/lib/ecore_con/meson.build | |
parent | 70ecf1056bb4be5a68b63044f938ccc2fe0a58c0 (diff) |
here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.
meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.
Further informations can be gathered from the README.meson
Right now, bindings & windows support are missing.
It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.
Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
Diffstat (limited to '')
-rw-r--r-- | src/lib/ecore_con/meson.build | 220 |
1 files changed, 220 insertions, 0 deletions
diff --git a/src/lib/ecore_con/meson.build b/src/lib/ecore_con/meson.build new file mode 100644 index 0000000000..f60e0a7185 --- /dev/null +++ b/src/lib/ecore_con/meson.build | |||
@@ -0,0 +1,220 @@ | |||
1 | ecore_con_deps = [] | ||
2 | ecore_con_pub_deps = [eina, eo, efl, ecore] | ||
3 | |||
4 | if target_machine.system() == 'windows' or target_machine.system() == 'cygwin' | ||
5 | ipv6 = cc.compiles(''' | ||
6 | #include <ws2tcpip.h> | ||
7 | struct ipv6_mreq tmp; | ||
8 | ''') | ||
9 | else | ||
10 | ipv6 = cc.compiles(''' | ||
11 | #include <netinet/in.h> | ||
12 | struct ipv6_mreq tmp; | ||
13 | ''') | ||
14 | endif | ||
15 | |||
16 | if ipv6 | ||
17 | config_h.set('HAVE_IPV6', 1) | ||
18 | endif | ||
19 | |||
20 | pub_legacy_eo_files = [ | ||
21 | 'ecore_con_eet_base.eo', | ||
22 | 'ecore_con_eet_server_obj.eo', | ||
23 | 'ecore_con_eet_client_obj.eo' | ||
24 | ] | ||
25 | |||
26 | pub_eo_file_target = [] | ||
27 | foreach eo_file : pub_legacy_eo_files | ||
28 | pub_eo_file_target += custom_target('eolian_gen_' + eo_file, | ||
29 | input : eo_file, | ||
30 | output : [eo_file + '.h', eo_file + '.legacy.h',], | ||
31 | install : true, | ||
32 | install_dir : dir_package_include, | ||
33 | command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, | ||
34 | '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), | ||
35 | '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), | ||
36 | '-o', 'l:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.h'), | ||
37 | '-gchl', '@INPUT@']) | ||
38 | |||
39 | endforeach | ||
40 | |||
41 | pub_eo_files = [ | ||
42 | 'efl_net_socket.eo', | ||
43 | 'efl_net_socket_simple.eo', | ||
44 | 'efl_net_socket_fd.eo', | ||
45 | 'efl_net_socket_tcp.eo', | ||
46 | 'efl_net_socket_udp.eo', | ||
47 | 'efl_net_dialer.eo', | ||
48 | 'efl_net_dialer_simple.eo', | ||
49 | 'efl_net_dialer_tcp.eo', | ||
50 | 'efl_net_dialer_udp.eo', | ||
51 | 'efl_net_dialer_http.eo', | ||
52 | 'efl_net_dialer_websocket.eo', | ||
53 | 'efl_net_server.eo', | ||
54 | 'efl_net_server_simple.eo', | ||
55 | 'efl_net_server_fd.eo', | ||
56 | 'efl_net_server_ip.eo', | ||
57 | 'efl_net_server_tcp.eo', | ||
58 | 'efl_net_server_udp.eo', | ||
59 | 'efl_net_server_udp_client.eo', | ||
60 | 'efl_net_socket_ssl.eo', | ||
61 | 'efl_net_ssl_context.eo', | ||
62 | 'efl_net_dialer_ssl.eo', | ||
63 | 'efl_net_server_ssl.eo', | ||
64 | 'efl_net_control_access_point.eo', | ||
65 | 'efl_net_control_technology.eo', | ||
66 | 'efl_net_control_manager.eo', | ||
67 | 'efl_net_session.eo', | ||
68 | 'efl_net_ip_address.eo', | ||
69 | ] | ||
70 | |||
71 | if target_machine.system() == 'windows' | ||
72 | pub_eo_files += [ | ||
73 | 'efl_net_socket_windows.eo', | ||
74 | 'efl_net_dialer_windows.eo', | ||
75 | 'efl_net_server_windows.eo' | ||
76 | ] | ||
77 | else | ||
78 | pub_eo_files += [ | ||
79 | 'efl_net_socket_unix.eo', | ||
80 | 'efl_net_dialer_unix.eo', | ||
81 | 'efl_net_server_unix.eo' | ||
82 | ] | ||
83 | endif | ||
84 | |||
85 | foreach eo_file : pub_eo_files | ||
86 | pub_eo_file_target += custom_target('eolian_gen_' + eo_file, | ||
87 | input : eo_file, | ||
88 | output : [eo_file + '.h', eo_file + '.legacy.h',], | ||
89 | install : true, | ||
90 | install_dir : dir_package_include, | ||
91 | command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, | ||
92 | '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), | ||
93 | '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), | ||
94 | '-o', 'l:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.h'), | ||
95 | '-gch', '@INPUT@']) | ||
96 | endforeach | ||
97 | |||
98 | |||
99 | pub_eo_types_files = [ | ||
100 | 'efl_net_types.eot', | ||
101 | 'efl_net_http_types.eot', | ||
102 | 'efl_net_ssl_types.eot' | ||
103 | ] | ||
104 | |||
105 | foreach eo_file : pub_eo_types_files | ||
106 | pub_eo_file_target += custom_target('eolian_gen_' + eo_file, | ||
107 | input : eo_file, | ||
108 | output : [eo_file + '.h'], | ||
109 | install : true, | ||
110 | install_dir : dir_package_include, | ||
111 | command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories, | ||
112 | '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), | ||
113 | '-gh', '@INPUT@']) | ||
114 | endforeach | ||
115 | |||
116 | eolian_include_directories += ['-I', meson.current_source_dir()] | ||
117 | |||
118 | ecore_con_header_src = [ | ||
119 | 'Ecore_Con.h', | ||
120 | 'Efl_Net.h', | ||
121 | 'Ecore_Con_Eet.h', | ||
122 | 'Ecore_Con_Eet_Legacy.h', | ||
123 | 'Ecore_Con_Eet_Eo.h' | ||
124 | ] | ||
125 | |||
126 | ecore_con_src = [ | ||
127 | 'ecore_con_alloc.c', | ||
128 | 'ecore_con.c', | ||
129 | 'ecore_con_proxy_helper.c', | ||
130 | 'ecore_con_legacy.c', | ||
131 | 'ecore_con_eet.c', | ||
132 | 'ecore_con_socks.c', | ||
133 | 'ecore_con_url.c', | ||
134 | 'ecore_con_url_curl.c', | ||
135 | 'ecore_con_url_curl.h', | ||
136 | 'ecore_con_private.h', | ||
137 | 'efl_net_socket.c', | ||
138 | 'efl_net_socket_simple.c', | ||
139 | 'efl_net_socket_fd.c', | ||
140 | 'efl_net_socket_tcp.c', | ||
141 | 'efl_net_socket_udp.c', | ||
142 | 'efl_net_dialer.c', | ||
143 | 'efl_net_dialer_simple.c', | ||
144 | 'efl_net_dialer_tcp.c', | ||
145 | 'efl_net_dialer_udp.c', | ||
146 | 'efl_net_dialer_http.c', | ||
147 | 'efl_net_dialer_websocket.c', | ||
148 | 'efl_net_server.c', | ||
149 | 'efl_net_server_simple.c', | ||
150 | 'efl_net_server_fd.c', | ||
151 | 'efl_net_server_ip.c', | ||
152 | 'efl_net_server_tcp.c', | ||
153 | 'efl_net_server_udp.c', | ||
154 | 'efl_net_server_udp_client.c', | ||
155 | 'efl_net_socket_ssl.c', | ||
156 | 'efl_net_ssl_context.c', | ||
157 | 'efl_net_dialer_ssl.c', | ||
158 | 'efl_net_server_ssl.c', | ||
159 | 'ecore_con_local.c', | ||
160 | 'efl_net_ip_address.c' | ||
161 | ] | ||
162 | |||
163 | if target_machine.system() == 'windows' | ||
164 | ecore_con_src += [ | ||
165 | 'efl_net_socket_windows.c', | ||
166 | 'efl_net_dialer_windows.c', | ||
167 | 'efl_net_server_windows.c' | ||
168 | ] | ||
169 | else | ||
170 | ecore_con_src += [ | ||
171 | 'efl_net_socket_unix.c', | ||
172 | 'efl_net_dialer_unix.c', | ||
173 | 'efl_net_server_unix.c' | ||
174 | ] | ||
175 | endif | ||
176 | |||
177 | if get_option('network-backend') == 'none' | ||
178 | ecore_con_src += [ | ||
179 | 'efl_net_control_access_point-none.c', | ||
180 | 'efl_net_control_technology-none.c', | ||
181 | 'efl_net_control-none.c', | ||
182 | 'efl_net_session-none.c' | ||
183 | ] | ||
184 | else | ||
185 | ecore_con_src += [ | ||
186 | 'efl_net-connman.h', | ||
187 | 'efl_net-connman.c', | ||
188 | 'efl_net_control_access_point-connman.c', | ||
189 | 'efl_net_control_technology-connman.c', | ||
190 | 'efl_net_control-connman.c', | ||
191 | 'efl_net_session-connman.c' | ||
192 | ] | ||
193 | ecore_con_deps += eldbus | ||
194 | endif | ||
195 | |||
196 | ecore_con_deps += crypto | ||
197 | |||
198 | ecore_con_lib = library('ecore_con', | ||
199 | ecore_con_src, pub_eo_file_target, | ||
200 | dependencies: [ecore, ecore_con_deps, http_parser, eldbus, eet, systemd, buildsystem, dl], | ||
201 | include_directories : config_dir, | ||
202 | install: true, | ||
203 | c_args : package_c_args, | ||
204 | version : meson.project_version() | ||
205 | ) | ||
206 | |||
207 | ecore_con = declare_dependency( | ||
208 | include_directories: [include_directories('.')], | ||
209 | link_with: ecore_con_lib, | ||
210 | sources : pub_eo_file_target + priv_eo_file_target, | ||
211 | dependencies: ecore_con_pub_deps, | ||
212 | ) | ||
213 | |||
214 | install_data(pub_eo_files + pub_eo_types_files + pub_legacy_eo_files, | ||
215 | install_dir: eolian_ecore_dir | ||
216 | ) | ||
217 | |||
218 | install_headers(ecore_con_header_src, | ||
219 | install_dir : dir_package_include, | ||
220 | ) | ||