1
1

cmake/win32: Fix building with WITH_VULKAN_BACKEND

The shader libraries were not hooked up yet in cmake for windows since
when the shaderc libs landed there was no code yet that used it.

It's required now, so this change adds the missing bits.
This commit is contained in:
2023-03-09 08:41:17 -07:00
parent b0037c5c6b
commit b7679addd2
2 changed files with 27 additions and 0 deletions

View File

@@ -993,6 +993,23 @@ if(WITH_VULKAN_BACKEND)
endif()
endif()
if(WITH_VULKAN_BACKEND)
if(EXISTS ${LIBDIR}/shaderc)
set(SHADERC_FOUND On)
set(SHADERC_ROOT_DIR ${LIBDIR}/shaderc)
set(SHADERC_INCLUDE_DIR ${SHADERC_ROOT_DIR}/include)
set(SHADERC_INCLUDE_DIRS ${SHADERC_INCLUDE_DIR})
set(SHADERC_LIBRARY
DEBUG ${SHADERC_ROOT_DIR}/lib/shaderc_shared_d.lib
OPTIMIZED ${SHADERC_ROOT_DIR}/lib/shaderc_shared.lib
)
set(SHADERC_LIBRARIES ${SHADERC_LIBRARY})
else()
message(WARNING "Shaderc was not found, disabling WITH_VULKAN_BACKEND")
set(WITH_VULKAN_BACKEND OFF)
endif()
endif()
if(WITH_CYCLES AND WITH_CYCLES_PATH_GUIDING)
find_package(openpgl QUIET)
if(openpgl_FOUND)

View File

@@ -1217,6 +1217,16 @@ elseif(WIN32)
ALL
)
windows_install_shared_manifest(
FILES ${LIBDIR}/shaderc/bin/shaderc_shared.dll
RELEASE
)
windows_install_shared_manifest(
FILES ${LIBDIR}/shaderc/bin/shaderc_shared_d.dll
DEBUG
)
windows_install_shared_manifest(
FILES
${LIBDIR}/openal/lib/OpenAL32.dll