From 8b9b24521b5e984c7c7bb63ffdd1436ec35a3767 Mon Sep 17 00:00:00 2001 From: SirLynix Date: Fri, 18 Nov 2022 20:22:05 +0100 Subject: [PATCH] Fix macOS compilation --- xmake.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/xmake.lua b/xmake.lua index fdf5658ae..937983f0e 100644 --- a/xmake.lua +++ b/xmake.lua @@ -27,8 +27,7 @@ local rendererBackends = { elseif is_plat("linux") then 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 + add_packages("xorgproto", "libx11", "wayland", { links = {} }) -- we only need X11 and waylands headers elseif is_plat("macosx") then add_defines("VK_USE_PLATFORM_METAL_EXT") add_files("src/Nazara/VulkanRenderer/**.mm") @@ -97,10 +96,10 @@ 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 + add_packages("xorgproto", "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 + add_packages("xorgproto", "libx11", { links = {} }) -- we only need X11 headers end end }, @@ -163,10 +162,11 @@ add_repositories("nazara-engine-repo https://github.com/NazaraEngine/xmake-repo" 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", "libx11") -elseif is_plat("macosx") then - add_requires("libx11") +if is_plat("linux", "macosx") then + add_requires("xorgproto", "libx11") + if is_plat("linux") then + add_requires("libuuid", "wayland") + end end add_rules("mode.asan", "mode.tsan", "mode.coverage", "mode.debug", "mode.releasedbg", "mode.release")