Fix compilation error on Linux if libx11 is not installed (#383)

This commit is contained in:
CiotatSoft 2022-11-16 12:09:04 +01:00 committed by GitHub
parent 335b34b31d
commit a9408bdb7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -28,6 +28,7 @@ local rendererBackends = {
add_defines("VK_USE_PLATFORM_XLIB_KHR")
add_defines("VK_USE_PLATFORM_WAYLAND_KHR")
add_packages("wayland", { links = {} }) -- we only need wayland headers
add_packages("libx11", { links = {} }) -- we only need X11 headers
elseif is_plat("macosx") then
add_defines("VK_USE_PLATFORM_METAL_EXT")
add_files("src/Nazara/VulkanRenderer/**.mm")
@ -96,6 +97,7 @@ local modules = {
elseif is_plat("linux") then
add_defines("SDL_VIDEO_DRIVER_X11=1")
add_defines("SDL_VIDEO_DRIVER_WAYLAND=1")
add_packages("libx11", { links = {} }) -- we only need X11 headers
elseif is_plat("macosx") then
add_defines("SDL_VIDEO_DRIVER_COCOA=1")
add_packages("libx11", { links = {} }) -- we only need X11 headers
@ -162,7 +164,7 @@ add_requires("nazarautils")
add_requires("nzsl", { debug = is_mode("debug"), configs = { with_symbols = not is_mode("release"), shared = true } })
if is_plat("linux") then
add_requires("libuuid", "wayland")
add_requires("libuuid", "wayland", "libx11")
elseif is_plat("macosx") then
add_requires("libx11")
end