From b8ee574bd8900f8f30e8e41fafbe9a039d6b6017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4ger?= Date: Thu, 13 Jul 2023 18:32:39 +0200 Subject: [PATCH 1/2] Build GLFW for both X11 and Wayland. --- download_dependencies.ps1 | 26 +++++++++++++++++++++----- glfw-redist.csproj | 7 ++++++- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/download_dependencies.ps1 b/download_dependencies.ps1 index d45bdf6..1ff6611 100644 --- a/download_dependencies.ps1 +++ b/download_dependencies.ps1 @@ -36,18 +36,34 @@ if (Test-Path tmp/src) { } Rename-Item -Path tmp/glfw-$GLFW_VERSION -NewName src -mkdir tmp/src/build -pushd tmp/src/build -cmake -DCMAKE_BUILD_TYPE=Release -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=ON .. +mkdir tmp/src/build-x11 +pushd tmp/src/build-x11 +cmake -DCMAKE_BUILD_TYPE=Release -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DBUILD_SHARED_LIBS=ON .. if ($LastExitCode -ne 0) { - throw 'GLFW compilation setup failed' + throw 'GLFW X11 compilation setup failed' } make -j if ($LastExitCode -ne 0) { - throw 'GLFW compilation failed' + throw 'GLFW X11 compilation failed' } popd + +mkdir tmp/src/build-wayland +pushd tmp/src/build-wayland +cmake -DCMAKE_BUILD_TYPE=Release -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DBUILD_SHARED_LIBS=ON -DGLFW_USE_WAYLAND=ON .. + +if ($LastExitCode -ne 0) { + throw 'GLFW Wayland compilation setup failed' +} + +make -j + +if ($LastExitCode -ne 0) { + throw 'GLFW Wayland compilation failed' +} + +popd \ No newline at end of file diff --git a/glfw-redist.csproj b/glfw-redist.csproj index f954bde..62a25e6 100644 --- a/glfw-redist.csproj +++ b/glfw-redist.csproj @@ -38,11 +38,16 @@ true PreserveNewest - + runtimes/linux-x64/native/ true PreserveNewest + + runtimes/linux-x64/native/wayland/ + true + PreserveNewest + COPYING.md From e1bf50051712f441a8d80af9fd67f6652d78cdc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4ger?= Date: Thu, 13 Jul 2023 18:39:09 +0200 Subject: [PATCH 2/2] Added Wayland apt dependencies --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9bf7b42..b4a4096 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: - name: Install X11 dependencies run: | sudo apt-get update - sudo apt-get install xorg-dev + sudo apt-get install xorg-dev libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules - uses: actions/checkout@v3 - name: Setup .NET Core uses: actions/setup-dotnet@v3