Skip to content

Commit

Permalink
fix: Vulkan shader gen binary path when Cross-compiling (#11096)
Browse files Browse the repository at this point in the history
* fix: Vulkan shader gen binary path when cross compiling
  • Loading branch information
ag2s20150909 authored Jan 8, 2025
1 parent 53ff6b9 commit bec2183
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ggml/src/ggml-vulkan/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,15 @@ if (Vulkan_FOUND)

file(GLOB _ggml_vk_shader_deps "${_ggml_vk_input_dir}/*.comp")

if (NOT CMAKE_CROSSCOMPILING)
set(_ggml_vk_genshaders_cmd "$<TARGET_FILE_DIR:vulkan-shaders-gen>/${_ggml_vk_genshaders_cmd}")
endif ()

add_custom_command(
OUTPUT ${_ggml_vk_header}
${_ggml_vk_source}

COMMAND "$<TARGET_FILE_DIR:vulkan-shaders-gen>/${_ggml_vk_genshaders_cmd}"
COMMAND ${_ggml_vk_genshaders_cmd}
--glslc ${Vulkan_GLSLC_EXECUTABLE}
--input-dir ${_ggml_vk_input_dir}
--output-dir ${_ggml_vk_output_dir}
Expand Down

0 comments on commit bec2183

Please sign in to comment.