summaryrefslogtreecommitdiff
path: root/src/wayland_protocol
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-10-13 12:24:37 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-10-15 22:02:17 +0200
commitbb2b21e55fc650819af6af6dc57934debfcb8ac8 (patch)
tree74a1f5ba956f955122daaee1d0fc4f76bc32ff06 /src/wayland_protocol
parentd3122474d44108397b07b28447dc790dd69ab5a8 (diff)
meson: fix build files size explosion
wayland protocols accidently added generated c source files to the sources. This lead to every dependency of evas compiling those 5 c source code files again and again and again. Which is completly wrong. This commit splits up between headers and c files. which reduces the build files from over 4K to roughly 3K. Differential Revision: https://phab.enlightenment.org/D7159
Diffstat (limited to 'src/wayland_protocol')
-rw-r--r--src/wayland_protocol/meson.build19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/wayland_protocol/meson.build b/src/wayland_protocol/meson.build
index 5f3680e..5301adb 100644
--- a/src/wayland_protocol/meson.build
+++ b/src/wayland_protocol/meson.build
@@ -23,31 +23,32 @@ wl_stable_protocol_sys = [
23] 23]
24 24
25foreach sys_protocol : wl_unstable_protocol_sys 25foreach sys_protocol : wl_unstable_protocol_sys
26 wl_protocol_local += [ 26 wl_protocol_local += [
27 join_paths(_wayland_protocols.get_pkgconfig_variable('pkgdatadir'), 'unstable', 27 join_paths(_wayland_protocols.get_pkgconfig_variable('pkgdatadir'), 'unstable',
28 sys_protocol)] 28 sys_protocol)]
29endforeach 29endforeach
30 30
31foreach sys_protocol : wl_stable_protocol_sys 31foreach sys_protocol : wl_stable_protocol_sys
32 wl_protocol_local += [ 32 wl_protocol_local += [
33 join_paths(_wayland_protocols.get_pkgconfig_variable('pkgdatadir'), 'stable', 33 join_paths(_wayland_protocols.get_pkgconfig_variable('pkgdatadir'), 'stable',
34 sys_protocol)] 34 sys_protocol)]
35endforeach 35endforeach
36 36
37gen_obj = [] 37gen_obj_c = []
38gen_obj_header = []
38 39
39foreach item : wl_protocol_local 40foreach item : wl_protocol_local
40 gen_obj += custom_target('wl_code_'+item.underscorify(), 41 gen_obj_c += custom_target('wl_code_'+item.underscorify(),
41 input: item, 42 input: item,
42 output : ['@BASENAME@-protocol.c'], 43 output : ['@BASENAME@-protocol.c'],
43 command: [wayland_scanner_bin, ['code','@INPUT@','@OUTPUT@']] 44 command: [wayland_scanner_bin, ['code','@INPUT@','@OUTPUT@']]
44 ) 45 )
45 gen_obj += custom_target('wl_client_header_'+item.underscorify(), 46 gen_obj_header += custom_target('wl_client_header_'+item.underscorify(),
46 input: item, 47 input: item,
47 output : ['@BASENAME@-client-protocol.h'], 48 output : ['@BASENAME@-client-protocol.h'],
48 command: [wayland_scanner_bin, ['client-header','@INPUT@','@OUTPUT@']] 49 command: [wayland_scanner_bin, ['client-header','@INPUT@','@OUTPUT@']]
49 ) 50 )
50 gen_obj += custom_target('wl_server_header_'+item.underscorify(), 51 gen_obj_header += custom_target('wl_server_header_'+item.underscorify(),
51 input: item, 52 input: item,
52 output : ['@BASENAME@-server-protocol.h'], 53 output : ['@BASENAME@-server-protocol.h'],
53 command: [wayland_scanner_bin, ['server-header','@INPUT@','@OUTPUT@']] 54 command: [wayland_scanner_bin, ['server-header','@INPUT@','@OUTPUT@']]
@@ -56,12 +57,12 @@ endforeach
56 57
57 58
58wayland_protocol_lib = static_library('wayland_protocol', 59wayland_protocol_lib = static_library('wayland_protocol',
59 gen_obj, 60 gen_obj_c + gen_obj_header,
60) 61)
61 62
62wayland_protocol = declare_dependency( 63wayland_protocol = declare_dependency(
63 include_directories: include_directories('.'), 64 include_directories: include_directories('.'),
64 link_with: wayland_protocol_lib, 65 link_with: wayland_protocol_lib,
65 sources: gen_obj, 66 sources: gen_obj_header,
66 dependencies : [wayland_client] 67 dependencies : [wayland_client]
67) \ No newline at end of file 68)