CMake: minor fix to the move_resource function;

This commit is contained in:
bjorn 2022-12-30 21:24:45 -08:00
parent d438578c42
commit fe3c383247
1 changed files with 3 additions and 4 deletions

View File

@ -627,11 +627,10 @@ add_custom_target(move_files ALL)
# Moves something from etc to the build directory
function(move_resource)
add_custom_command(TARGET move_files POST_BUILD
set(SRC "${CMAKE_CURRENT_SOURCE_DIR}/etc/${ARGV0}")
add_custom_command(TARGET lovr POST_BUILD
DEPENDS ${SRC}
COMMAND ${CMAKE_COMMAND} -E copy
"${CMAKE_CURRENT_SOURCE_DIR}/etc/${ARGV0}"
$<TARGET_FILE_DIR:lovr>/${ARGV0}
COMMAND ${CMAKE_COMMAND} -E copy ${SRC} $<TARGET_FILE_DIR:lovr>/${ARGV0}
)
endfunction()