Fix ninja multiple dummy generation error
This commit is contained in:
parent
812ce3046b
commit
420e8cbea9
1 changed files with 3 additions and 3 deletions
|
@ -29,15 +29,15 @@ function(add_platform_commands target)
|
||||||
# always are. WHY CMAKE WHY
|
# always are. WHY CMAKE WHY
|
||||||
set(DUMMY_NAME ${target}-CopyShaders)
|
set(DUMMY_NAME ${target}-CopyShaders)
|
||||||
|
|
||||||
add_custom_target(${DUMMY_NAME} ALL DEPENDS ${CMAKE_BINARY_DIR}/dummy)
|
add_custom_target(${DUMMY_NAME} ALL DEPENDS ${CMAKE_BINARY_DIR}/${target}-dummy)
|
||||||
|
|
||||||
if(ENABLE_MACOS)
|
if(ENABLE_MACOS)
|
||||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/dummy
|
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${target}-dummy
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${target}>/../Resources/shaders
|
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${target}>/../Resources/shaders
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/shaders $<TARGET_FILE_DIR:${target}>/../Resources/shaders
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/shaders $<TARGET_FILE_DIR:${target}>/../Resources/shaders
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/dummy
|
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${target}-dummy
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${target}>/shaders
|
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${target}>/shaders
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/shaders $<TARGET_FILE_DIR:${target}>/shaders
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/shaders $<TARGET_FILE_DIR:${target}>/shaders
|
||||||
)
|
)
|
||||||
|
|
Reference in a new issue