CMake: move_dll works with empty arguments;

This commit is contained in:
bjorn 2019-03-06 11:06:02 -08:00
parent f1ff7bc38a
commit 2b41d6948c
1 changed files with 4 additions and 4 deletions

View File

@ -522,12 +522,12 @@ if(WIN32)
target_compile_definitions(lovr PUBLIC -Dinline=__inline -Dsnprintf=_snprintf) target_compile_definitions(lovr PUBLIC -Dinline=__inline -Dsnprintf=_snprintf)
endif() endif()
function(move_dll ARG_TARGET) function(move_dll)
if(TARGET ${ARG_TARGET}) if(TARGET ${ARGV0})
add_custom_command(TARGET lovr POST_BUILD add_custom_command(TARGET lovr POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:${ARG_TARGET}> $<TARGET_FILE:${ARGV0}>
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/$<TARGET_FILE_NAME:${ARG_TARGET}> ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/$<TARGET_FILE_NAME:${ARGV0}>
) )
endif() endif()
endfunction() endfunction()