From fb3d5827f0ed25a7c18bdb4845ad82068d8de9bd Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sun, 3 May 2020 23:32:35 +0300 Subject: [PATCH] Fix linux build --- 3rdparty/CMakeLists.txt | 2 +- Vulkan/CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index 45618d0910..8dfc95e688 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -297,7 +297,7 @@ if(USE_VULKAN) if(VULKAN_FOUND) add_library(3rdparty_vulkan INTERFACE) target_compile_definitions(3rdparty_vulkan INTERFACE -DHAVE_VULKAN) - target_link_libraries(3rdparty_vulkan INTERFACE SPIRV Vulkan::Vulkan) + target_link_libraries(3rdparty_vulkan INTERFACE SPIRV SPIRV-Tools-opt Vulkan::Vulkan) if(UNIX AND NOT APPLE) find_package(Wayland) diff --git a/Vulkan/CMakeLists.txt b/Vulkan/CMakeLists.txt index 269c5cf750..16a029029f 100644 --- a/Vulkan/CMakeLists.txt +++ b/Vulkan/CMakeLists.txt @@ -6,3 +6,7 @@ set(ENABLE_HLSL OFF CACHE BOOL "Enables HLSL input support" FORCE) set(ENABLE_OPT OFF CACHE BOOL "Enables spirv-opt capability if present" FORCE) set(ENABLE_CTEST OFF CACHE BOOL "Enables testing" FORCE) add_subdirectory(glslang) + +set(SKIP_SPIRV_TOOLS_INSTALL ON CACHE BOOL "Skip spirv-tools install" FORCE) +set(SPIRV-Headers_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/spirv-headers" CACHE STRING "spirv-headers path" FORCE) +add_subdirectory(spirv-tools)