From 08fe20ad760d5e58bc1167ab77d533bdb594b5e9 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 1 Oct 2024 21:11:47 +1000 Subject: [PATCH] CMake: Add spirv-cross include path to util --- src/util/CMakeLists.txt | 7 ++++--- src/util/gpu_device.cpp | 2 +- src/util/util.props | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt index b08fdef04..c47acf614 100644 --- a/src/util/CMakeLists.txt +++ b/src/util/CMakeLists.txt @@ -133,7 +133,7 @@ if(ENABLE_OPENGL) ) endif() if(ANDROID) - target_include_directories(util PRIVATE "${CMAKE_SOURCE_DIR}/android/app/src/cpp") + target_include_directories(util PRIVATE "${CMAKE_SOURCE_DIR}/android") endif() endif() @@ -170,9 +170,10 @@ if(ENABLE_VULKAN) endif() if(ENABLE_VULKAN OR APPLE) - # shaderc is loaded dynamically to reduce module loads on startup. + # shaderc/spirv-cross is loaded dynamically to reduce module loads on startup. get_target_property(SHADERC_INCLUDE_DIR Shaderc::shaderc_shared INTERFACE_INCLUDE_DIRECTORIES) - target_include_directories(util PUBLIC ${SHADERC_INCLUDE_DIR}) + get_target_property(SPIRV_CROSS_INCLUDE_DIR spirv-cross-c-shared INTERFACE_INCLUDE_DIRECTORIES) + target_include_directories(util PUBLIC ${SHADERC_INCLUDE_DIR} ${SPIRV_CROSS_INCLUDE_DIR}) endif() if(NOT ANDROID) diff --git a/src/util/gpu_device.cpp b/src/util/gpu_device.cpp index 989e9f067..34052d6da 100644 --- a/src/util/gpu_device.cpp +++ b/src/util/gpu_device.cpp @@ -22,7 +22,7 @@ #include "fmt/format.h" #include "imgui.h" #include "shaderc/shaderc.h" -#include "spirv_cross/spirv_cross_c.h" +#include "spirv_cross_c.h" #include "xxhash.h" LOG_CHANNEL(GPUDevice); diff --git a/src/util/util.props b/src/util/util.props index 4f027f045..eb7c15cd9 100644 --- a/src/util/util.props +++ b/src/util/util.props @@ -23,7 +23,7 @@ - %(AdditionalIncludeDirectories);$(DepsIncludeDir)SDL2 + %(AdditionalIncludeDirectories);$(DepsIncludeDir)SDL2;$(DepsIncludeDir)spirv_cross %(AdditionalDependencies);cpuinfo.lib;freetype.lib;jpeg.lib;libpng16.lib;libwebp.lib;lunasvg.lib;SDL2.lib;soundtouch.lib;zlib.lib;zstd.lib