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
This commit is contained in:
parent
d3122474d4
commit
bb2b21e55f
|
@ -23,31 +23,32 @@ wl_stable_protocol_sys = [
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach sys_protocol : wl_unstable_protocol_sys
|
foreach sys_protocol : wl_unstable_protocol_sys
|
||||||
wl_protocol_local += [
|
wl_protocol_local += [
|
||||||
join_paths(_wayland_protocols.get_pkgconfig_variable('pkgdatadir'), 'unstable',
|
join_paths(_wayland_protocols.get_pkgconfig_variable('pkgdatadir'), 'unstable',
|
||||||
sys_protocol)]
|
sys_protocol)]
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
foreach sys_protocol : wl_stable_protocol_sys
|
foreach sys_protocol : wl_stable_protocol_sys
|
||||||
wl_protocol_local += [
|
wl_protocol_local += [
|
||||||
join_paths(_wayland_protocols.get_pkgconfig_variable('pkgdatadir'), 'stable',
|
join_paths(_wayland_protocols.get_pkgconfig_variable('pkgdatadir'), 'stable',
|
||||||
sys_protocol)]
|
sys_protocol)]
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
gen_obj = []
|
gen_obj_c = []
|
||||||
|
gen_obj_header = []
|
||||||
|
|
||||||
foreach item : wl_protocol_local
|
foreach item : wl_protocol_local
|
||||||
gen_obj += custom_target('wl_code_'+item.underscorify(),
|
gen_obj_c += custom_target('wl_code_'+item.underscorify(),
|
||||||
input: item,
|
input: item,
|
||||||
output : ['@BASENAME@-protocol.c'],
|
output : ['@BASENAME@-protocol.c'],
|
||||||
command: [wayland_scanner_bin, ['code','@INPUT@','@OUTPUT@']]
|
command: [wayland_scanner_bin, ['code','@INPUT@','@OUTPUT@']]
|
||||||
)
|
)
|
||||||
gen_obj += custom_target('wl_client_header_'+item.underscorify(),
|
gen_obj_header += custom_target('wl_client_header_'+item.underscorify(),
|
||||||
input: item,
|
input: item,
|
||||||
output : ['@BASENAME@-client-protocol.h'],
|
output : ['@BASENAME@-client-protocol.h'],
|
||||||
command: [wayland_scanner_bin, ['client-header','@INPUT@','@OUTPUT@']]
|
command: [wayland_scanner_bin, ['client-header','@INPUT@','@OUTPUT@']]
|
||||||
)
|
)
|
||||||
gen_obj += custom_target('wl_server_header_'+item.underscorify(),
|
gen_obj_header += custom_target('wl_server_header_'+item.underscorify(),
|
||||||
input: item,
|
input: item,
|
||||||
output : ['@BASENAME@-server-protocol.h'],
|
output : ['@BASENAME@-server-protocol.h'],
|
||||||
command: [wayland_scanner_bin, ['server-header','@INPUT@','@OUTPUT@']]
|
command: [wayland_scanner_bin, ['server-header','@INPUT@','@OUTPUT@']]
|
||||||
|
@ -56,12 +57,12 @@ endforeach
|
||||||
|
|
||||||
|
|
||||||
wayland_protocol_lib = static_library('wayland_protocol',
|
wayland_protocol_lib = static_library('wayland_protocol',
|
||||||
gen_obj,
|
gen_obj_c + gen_obj_header,
|
||||||
)
|
)
|
||||||
|
|
||||||
wayland_protocol = declare_dependency(
|
wayland_protocol = declare_dependency(
|
||||||
include_directories: include_directories('.'),
|
include_directories: include_directories('.'),
|
||||||
link_with: wayland_protocol_lib,
|
link_with: wayland_protocol_lib,
|
||||||
sources: gen_obj,
|
sources: gen_obj_header,
|
||||||
dependencies : [wayland_client]
|
dependencies : [wayland_client]
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue