Skip to content

Commit

Permalink
wrage
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishan09811 authored Jun 9, 2024
1 parent de835aa commit 2d36674
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/workflows/Windows_Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@ jobs:
vulkan-use-cache: true
vulkan-components: Vulkan-Headers, Vulkan-Loader, SPIRV-Tools, Glslang

- name: Download and install glslangValidator
run: |
curl -L -o glslang.zip https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-windows-x64-Release.zip
mkdir glslang
tar -xf glslang.zip -C glslang --strip-components=1
echo "${{github.workspace}}/glslang/bin" >> $GITHUB_PATH
- name: Verify glslangValidator installation
run: |
if (glslang\\bin\\glslangValidator.exe --version) {
Write-Output "glslangValidator is installed successfully."
} else {
Write-Error "glslangValidator could not be found."
exit 1
}
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
Expand Down
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,19 @@ if(ENABLE_OPENGL)
endif()

if(ENABLE_VULKAN)
if(NOT glslangValidator IN_LIST Vulkan_FIND_COMPONENTS)
if(NOT "glslangValidator" IN_LIST Vulkan_FIND_COMPONENTS)
list(APPEND Vulkan_FIND_COMPONENTS glslangValidator)
endif()

find_package(Vulkan REQUIRED COMPONENTS ${Vulkan_FIND_COMPONENTS})

if (NOT TARGET glslangValidator)
add_executable(glslangValidator IMPORTED)
set_target_properties(glslangValidator PROPERTIES
IMPORTED_LOCATION "${VULKAN_SDK}/bin/glslangValidator.exe"
)
endif()

set(RENDERER_VK_INCLUDE_FILES include/renderer_vk/renderer_vk.hpp
include/renderer_vk/vk_api.hpp include/renderer_vk/vk_debug.hpp
include/renderer_vk/vk_descriptor_heap.hpp
Expand Down

0 comments on commit 2d36674

Please sign in to comment.