diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml index 955145e72..d2575a5a9 100644 --- a/.github/workflows/macos-build.yml +++ b/.github/workflows/macos-build.yml @@ -63,7 +63,7 @@ jobs: # Setup compilation mode and install project dependencies - name: Configure xmake and install dependencies - run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --ccache=n --ffmpeg=y --shadernodes=y --tests=y --unitybuild=y --yes -vD + run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --ccache=n --ffmpeg=y --shadernodes=y --tests=y --unitybuild=y --yes # Build the engine - name: Build Nazara diff --git a/.github/workflows/msys2-build.yml b/.github/workflows/msys2-build.yml index 5cc7a4143..658ba7cfc 100644 --- a/.github/workflows/msys2-build.yml +++ b/.github/workflows/msys2-build.yml @@ -92,7 +92,7 @@ jobs: # Setup compilation mode and install project dependencies - name: Configure xmake and install dependencies - run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --ccache=n --ffmpeg=y --shadernodes=y --tests=y --unitybuild=y --yes --verbose --diagnosis --policies=package.include_external_headers:n + run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --ccache=n --ffmpeg=y --shadernodes=y --tests=y --unitybuild=y --yes --policies=package.include_external_headers:n # Build the engine - name: Build Nazara diff --git a/src/Nazara/Platform/SDL2/WindowImpl.cpp b/src/Nazara/Platform/SDL2/WindowImpl.cpp index f4732be25..0ee55185c 100644 --- a/src/Nazara/Platform/SDL2/WindowImpl.cpp +++ b/src/Nazara/Platform/SDL2/WindowImpl.cpp @@ -13,6 +13,13 @@ #include #include #include + +#ifdef NAZARA_PLATFORM_MACOS +// I'm not sure why, but SDL_VIDEO_DRIVER_X11 is automatically defined here by SDL_config.h +// This is problematic as it requires X11/X.h which is not present (adding libxext/libx11/xorgproto packages didn't help) +#undef SDL_VIDEO_DRIVER_X11 +#endif + #include #include #include diff --git a/xmake.lua b/xmake.lua index 937983f0e..7ecaea213 100644 --- a/xmake.lua +++ b/xmake.lua @@ -27,7 +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("xorgproto", "libx11", "wayland", { links = {} }) -- we only need X11 and waylands headers + add_packages("libxext", "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") @@ -96,10 +96,9 @@ local modules = { elseif is_plat("linux") then add_defines("SDL_VIDEO_DRIVER_X11=1") add_defines("SDL_VIDEO_DRIVER_WAYLAND=1") - add_packages("xorgproto", "libx11", { links = {} }) -- we only need X11 headers + add_packages("libxext", "wayland", { links = {} }) -- we only need X11 headers elseif is_plat("macosx") then add_defines("SDL_VIDEO_DRIVER_COCOA=1") - add_packages("xorgproto", "libx11", { links = {} }) -- we only need X11 headers end end }, @@ -162,11 +161,8 @@ 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", "macosx") then - add_requires("xorgproto", "libx11") - if is_plat("linux") then - add_requires("libuuid", "wayland") - end +if is_plat("linux") then + add_requires("libxext", "libuuid", "wayland") end add_rules("mode.asan", "mode.tsan", "mode.coverage", "mode.debug", "mode.releasedbg", "mode.release")