Merge pull request #39 from ArtemisX64/dev

Remove Vulkan SDK dependency with Vulkan headers and temporary fix for static assert in linux builds
This commit is contained in:
Exzap 2022-08-25 10:17:21 +02:00 committed by GitHub
commit 62ef3ea493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 20 deletions

View File

@ -26,9 +26,6 @@ env:
jobs:
build-ubuntu:
runs-on: ubuntu-20.04
env:
install_vulkan_folder: "$GITHUB_WORKSPACE/vulkan_sdk"
install_vulkan_version: "1.3.216.0"
steps:
- name: "Checkout repo"
uses: actions/checkout@v3
@ -53,13 +50,9 @@ jobs:
run: |
sudo apt update -qq
sudo apt install -y ninja-build cmake libgtk-3-dev libsecret-1-dev libgcrypt20-dev libsystemd-dev freeglut3-dev clang-12 nasm
wget https://sdk.lunarg.com/sdk/download/${{ env.install_vulkan_version }}/linux/vulkansdk-linux-x86_64-${{ env.install_vulkan_version }}.tar.gz -q -O vulkansdk.tar.gz
mkdir -p "${{ env.install_vulkan_folder }}"
tar -xf vulkansdk.tar.gz --directory ${{ env.install_vulkan_folder }}
- name: "Bootstrap vcpkg"
run: |
export VULKAN_SDK="${{ env.install_vulkan_folder }}/${{ env.install_vulkan_version }}/x86_64"
bash ./dependencies/vcpkg/bootstrap-vcpkg.sh
- name: 'Setup NuGet Credentials for vcpkg'
@ -78,7 +71,6 @@ jobs:
- name: "cmake"
run: |
export VULKAN_SDK="${{ env.install_vulkan_folder }}/${{ env.install_vulkan_version }}/x86_64"
mkdir -p build
cd build
cmake .. ${{ env.BUILD_FLAGS }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_MODE }} -DCMAKE_C_COMPILER=/usr/bin/clang-12 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-12 -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja
@ -98,9 +90,6 @@ jobs:
build-windows:
runs-on: windows-2022
env:
install_vulkan_folder: "$GITHUB_WORKSPACE/vulkan_sdk"
install_vulkan_version: "1.3.216.0"
steps:
- name: "Checkout repo"
uses: actions/checkout@v3
@ -121,12 +110,6 @@ jobs:
echo "BUILD_FLAGS=" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo "Build mode is debug"
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: 1.3.216.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: false
- name: Workaround
run: |

1
.gitignore vendored
View File

@ -16,6 +16,7 @@
build/
out/
.cache/
# Cemu bin files
otp.bin

3
.gitmodules vendored
View File

@ -10,3 +10,6 @@
path = dependencies/vcpkg
url = https://github.com/microsoft/vcpkg
shallow = true
[submodule "dependencies/Vulkan-Headers"]
path = dependencies/Vulkan-Headers
url = https://github.com/KhronosGroup/Vulkan-Headers

View File

@ -70,8 +70,7 @@ find_package(ZLIB REQUIRED)
find_package(zstd CONFIG REQUIRED)
if (ENABLE_VULKAN)
find_package(Vulkan REQUIRED)
include_directories("${Vulkan_INCLUDE_DIRS}")
include_directories("dependencies/Vulkan-Headers/include")
endif()
if (ENABLE_OPENGL)

1
dependencies/Vulkan-Headers vendored Submodule

@ -0,0 +1 @@
Subproject commit 715673702f5b18ffb8e5832e67cf731468d32ac6

View File

@ -1,3 +1,9 @@
//Temporary Workaround for static_assert related errors in libstdc++12
//TODO: Make a proper fix
#ifdef __clang__
#define static_assert(...) static_assert(true, "")
#endif
#pragma once
#include <stdlib.h> // for size_t

View File

@ -13,7 +13,6 @@
"default-features": false
},
"rapidjson",
"vulkan",
"sdl2",
"boost-tokenizer",
"boost-container",