Merge pull request #6 from dpogue/depends-fix

Fix invalid DEPENDS in add_custom_command
This commit is contained in:
Darryl Pogue 2024-12-03 21:25:12 -08:00 committed by GitHub
commit 989857d2e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -42,8 +42,8 @@ function(target_embed_metal_shader_libraries TARGET)
)
else()
foreach(SHADERLIB IN LISTS _temsl_UNPARSED_ARGUMENTS)
add_dependencies(${TARGET} ${SHADERLIB})
add_custom_command(TARGET ${TARGET} POST_BUILD
DEPENDS ${SHADERLIB}
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:${SHADERLIB}>" "$<TARGET_BUNDLE_CONTENT_DIR:${TARGET}>/Resources/$<TARGET_FILE_NAME:${SHADERLIB}>"
VERBATIM
)