From 970d9e57c817028ad4c2695adc8205e303de20b9 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Thu, 14 Mar 2019 02:17:19 -0300 Subject: [PATCH] video_core: Add sirit as optional dependency with Vulkan sirit is a runtime assembler for SPIR-V --- .gitmodules | 3 +++ externals/CMakeLists.txt | 5 +++++ externals/sirit | 1 + src/video_core/CMakeLists.txt | 5 ++++- 4 files changed, 13 insertions(+), 1 deletion(-) create mode 160000 externals/sirit diff --git a/.gitmodules b/.gitmodules index 26b4e5272..3a49c4874 100644 --- a/.gitmodules +++ b/.gitmodules @@ -43,3 +43,6 @@ [submodule "externals/zstd"] path = externals/zstd url = https://github.com/facebook/zstd +[submodule "sirit"] + path = externals/sirit + url = https://github.com/ReinUsesLisp/sirit diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index aa3319eb1..3f8b6cda8 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -72,6 +72,11 @@ if (USE_DISCORD_PRESENCE) target_include_directories(discord-rpc INTERFACE ./discord-rpc/include) endif() +# Sirit +if (ENABLE_VULKAN) + add_subdirectory(sirit) +endif() + if (ENABLE_WEB_SERVICE) # LibreSSL set(LIBRESSL_SKIP_INSTALL ON CACHE BOOL "") diff --git a/externals/sirit b/externals/sirit new file mode 160000 index 000000000..f7c4b07a7 --- /dev/null +++ b/externals/sirit @@ -0,0 +1 @@ +Subproject commit f7c4b07a7e14edb1dcd93bc9879c823423705c2e diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index 242a0d1cd..fe6b6ef7d 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt @@ -132,7 +132,7 @@ if (ENABLE_VULKAN) renderer_vulkan/vk_swapchain.cpp renderer_vulkan/vk_swapchain.h) - target_include_directories(video_core PRIVATE ../../externals/Vulkan-Headers/include) + target_include_directories(video_core PRIVATE sirit ../../externals/Vulkan-Headers/include) target_compile_definitions(video_core PRIVATE HAS_VULKAN) endif() @@ -140,3 +140,6 @@ create_target_directory_groups(video_core) target_link_libraries(video_core PUBLIC common core) target_link_libraries(video_core PRIVATE glad) +if (ENABLE_VULKAN) + target_link_libraries(video_core PRIVATE sirit) +endif()