From 3f7b504164f01d010d935e33400b4f747b93a01c Mon Sep 17 00:00:00 2001 From: SirLynix Date: Thu, 28 Jul 2022 13:03:49 +0200 Subject: [PATCH] XMake: handle wayland and libuuid on Linux --- .github/workflows/coverage.yml | 2 +- .github/workflows/linux-build.yml | 2 +- xmake.lua | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 25b38b74e..d7b50b6e8 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -40,7 +40,7 @@ jobs: if: runner.os == 'Linux' run: | sudo apt-get update - sudo apt-get -y install mesa-common-dev libwayland-dev uuid-dev gcovr + sudo apt-get -y install mesa-common-dev gcovr - name: Install OpenCppCoverage (Windows) if: runner.os == 'Windows' diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 7ad839c3b..89acba2fe 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -39,7 +39,7 @@ jobs: - name: Install system dependencies run: | sudo apt-get update - sudo apt-get -y install mesa-common-dev libwayland-dev uuid-dev + sudo apt-get -y install mesa-common-dev # Force xmake to a specific folder (for cache) - name: Set xmake env diff --git a/xmake.lua b/xmake.lua index fa7b4a895..3a4ad80a8 100644 --- a/xmake.lua +++ b/xmake.lua @@ -15,7 +15,9 @@ local modules = { if is_plat("windows", "mingw") then add_syslinks("ole32") elseif is_plat("linux") then - add_syslinks("dl", "pthread", "uuid") + add_packages("wayland", { links = {} }) -- we only need wayland headers + add_packages("libuuid") + add_syslinks("dl", "pthread") end end, Packages = { "entt" }, @@ -156,7 +158,9 @@ 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("macosx") then +if is_plat("linux") then + add_requires("libuuid", "wayland") +elseif is_plat("macosx") then add_requires("libx11") end