dynamically load wayland and its dependencies, fix warnings
This commit is contained in:
parent
e86d6acdf3
commit
47746ff30e
5 changed files with 522 additions and 74 deletions
|
|
@ -29,13 +29,12 @@ if (grep(/^gdi$/, @backends)) {
|
|||
if (grep(/^wayland$/, @backends)) {
|
||||
add_cflags("-DUSE_WAYLAND");
|
||||
new_object("src/backend/wayland.c");
|
||||
add_cflags(`pkg-config --cflags cairo wayland-client xkbcommon`);
|
||||
add_libs(`pkg-config --libs cairo wayland-client xkbcommon`);
|
||||
|
||||
if (param_get("opengl")) {
|
||||
add_libs(`pkg-config --libs egl wayland-egl`);
|
||||
add_cflags("-DWAYLAND_LOAD_OPENGL");
|
||||
}
|
||||
|
||||
scan_wayland_protocol_core();
|
||||
scan_wayland_protocol("stable", "xdg-shell", "");
|
||||
scan_wayland_protocol("stable", "viewporter", "");
|
||||
scan_wayland_protocol("stable", "tablet", "-v2");
|
||||
|
|
|
|||
29
pl/utils.pl
29
pl/utils.pl
|
|
@ -58,6 +58,35 @@ sub use_backend {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
sub scan_wayland_protocol_core {
|
||||
my $proto_c = "src/backend/wayland-core-protocol.c";
|
||||
|
||||
if (
|
||||
system(
|
||||
"wayland-scanner private-code /usr/share/wayland/wayland.xml ${proto_c}"
|
||||
) != 0
|
||||
)
|
||||
{
|
||||
print(
|
||||
"^ Error on getting private code for /usr/share/wayland/wayland.xml\n"
|
||||
);
|
||||
}
|
||||
else {
|
||||
new_object($proto_c);
|
||||
}
|
||||
if (
|
||||
system(
|
||||
"wayland-scanner client-header /usr/share/wayland/wayland.xml include/Mw/LowLevel/Wayland/wayland-core-protocol.h"
|
||||
)
|
||||
)
|
||||
{
|
||||
print(
|
||||
"^ Error on getting client header for /usr/share/wayland/wayland.xml\n"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
sub scan_wayland_protocol {
|
||||
my $tier = $_[0];
|
||||
my $proto = $_[1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue