fix: Vulkan shader gen binary path when Cross-compiling (#11096)

* fix: Vulkan shader gen binary path when cross compiling
This commit is contained in:
ag2s20150909 2025-01-08 16:17:29 +08:00 committed by GitHub
parent 53ff6b9b9f
commit bec2183f2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -69,11 +69,15 @@ if (Vulkan_FOUND)
file(GLOB _ggml_vk_shader_deps "${_ggml_vk_input_dir}/*.comp") 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( add_custom_command(
OUTPUT ${_ggml_vk_header} OUTPUT ${_ggml_vk_header}
${_ggml_vk_source} ${_ggml_vk_source}
COMMAND "$<TARGET_FILE_DIR:vulkan-shaders-gen>/${_ggml_vk_genshaders_cmd}" COMMAND ${_ggml_vk_genshaders_cmd}
--glslc ${Vulkan_GLSLC_EXECUTABLE} --glslc ${Vulkan_GLSLC_EXECUTABLE}
--input-dir ${_ggml_vk_input_dir} --input-dir ${_ggml_vk_input_dir}
--output-dir ${_ggml_vk_output_dir} --output-dir ${_ggml_vk_output_dir}