Dynamically load libwayland-egl.so.1 when dealing with Wayland to remove dependencies at program startup. (#3359)

This commit is contained in:
Martijn Courteaux
2024-10-01 20:06:56 +02:00
committed by GitHub
parent 7e5bb54a3e
commit a6e372ead9
4 changed files with 51 additions and 37 deletions

View File

@@ -22,7 +22,7 @@ newoption {
newoption {
trigger = "with-wayland",
description = "Use Wayland backend.",
description = "Enable Wayland support.",
}
newoption {
@@ -235,13 +235,6 @@ function exampleProjectDefaults()
defines { "ENTRY_CONFIG_USE_SDL=1" }
links { "SDL2" }
configuration { "linux or freebsd" }
if _OPTIONS["with-wayland"] then
links {
"wayland-egl",
}
end
configuration { "osx*" }
libdirs { "$(SDL2_DIR)/lib" }
@@ -253,19 +246,13 @@ function exampleProjectDefaults()
links { "glfw3" }
configuration { "linux or freebsd" }
if _OPTIONS["with-wayland"] then
links {
"wayland-egl",
}
else
links {
"Xrandr",
"Xinerama",
"Xi",
"Xxf86vm",
"Xcursor",
}
end
links {
"Xrandr",
"Xinerama",
"Xi",
"Xxf86vm",
"Xcursor",
}
configuration { "osx*" }
linkoptions {