Skip to content

Commit

Permalink
build: drop intermediate libraries for protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
emersion committed Nov 25, 2022
1 parent e5475d9 commit af8a5a8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 30 deletions.
27 changes: 2 additions & 25 deletions protocols/meson.build
Expand Up @@ -20,7 +20,6 @@ protocols = [
]

wl_protos_src = []
wl_protos_headers = []

foreach xml : protocols
wl_protos_src += custom_target(
Expand All @@ -29,38 +28,16 @@ foreach xml : protocols
output: '@BASENAME@-protocol.c',
command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'],
)
wl_protos_headers += custom_target(
wl_protos_src += custom_target(
xml.underscorify() + '_server_h',
input: xml,
output: '@BASENAME@-protocol.h',
command: [wayland_scanner, 'server-header', '@INPUT@', '@OUTPUT@'],
)
wl_protos_headers += custom_target(
wl_protos_src += custom_target(
xml.underscorify() + '_client_h',
input: xml,
output: '@BASENAME@-client-protocol.h',
command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
)
endforeach

lib_client_protos = static_library(
'client_protos',
wl_protos_src + wl_protos_headers,
dependencies: wayland_client.partial_dependency(compile_args: true),
)

client_protos = declare_dependency(
link_with: lib_client_protos,
sources: wl_protos_headers,
)

lib_server_protos = static_library(
'server_protos',
wl_protos_src + wl_protos_headers,
dependencies: wayland_server.partial_dependency(compile_args: true),
)

server_protos = declare_dependency(
link_with: lib_server_protos,
sources: wl_protos_headers,
)
3 changes: 1 addition & 2 deletions sway/meson.build
Expand Up @@ -222,7 +222,6 @@ sway_deps = [
pcre2,
glesv2,
pixman,
server_protos,
threads,
wayland_server,
wlroots,
Expand All @@ -237,7 +236,7 @@ endif

executable(
'sway',
sway_sources,
sway_sources + wl_protos_src,
include_directories: [sway_inc],
dependencies: sway_deps,
link_with: [lib_sway_common],
Expand Down
4 changes: 2 additions & 2 deletions swaybar/meson.build
Expand Up @@ -8,7 +8,6 @@ tray_files = have_tray ? [

swaybar_deps = [
cairo,
client_protos,
gdk_pixbuf,
jsonc,
math,
Expand All @@ -32,7 +31,8 @@ executable(
'main.c',
'render.c',
'status_line.c',
tray_files
tray_files,
wl_protos_src,
],
include_directories: [sway_inc],
dependencies: swaybar_deps,
Expand Down
2 changes: 1 addition & 1 deletion swaynag/meson.build
Expand Up @@ -5,11 +5,11 @@ executable(
'render.c',
'swaynag.c',
'types.c',
wl_protos_src,
],
include_directories: [sway_inc],
dependencies: [
cairo,
client_protos,
pango,
pangocairo,
wayland_client,
Expand Down

0 comments on commit af8a5a8

Please sign in to comment.