cmake: Fix copying targets on Windows in multi-config build systems

Signed-off-by: Cosmin Truta <ctruta@gmail.com>
This commit is contained in:
Tyler Kropp 2023-05-19 19:16:10 -04:00 committed by Cosmin Truta
parent b2ef6edbe8
commit 1547b335e4

View File

@ -25,6 +25,7 @@
# Revised by Martin Storsjo, 2022 # Revised by Martin Storsjo, 2022
# Revised by Jon Creighton, 2023 # Revised by Jon Creighton, 2023
# Revised by Gunther Nikl, 2023 # Revised by Gunther Nikl, 2023
# Revised by Tyler Kropp, 2023
# This code is released under the libpng license. # This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer # For conditions of distribution and use, see the disclaimer
@ -938,7 +939,7 @@ function(create_symlink DEST_FILE)
POST_BUILD POST_BUILD
COMMAND "${CMAKE_COMMAND}" COMMAND "${CMAKE_COMMAND}"
-E copy_if_different -E copy_if_different
$<TARGET_LINKER_FILE_NAME:${_SYM_TARGET}> $<TARGET_LINKER_FILE_DIR:${_SYM_TARGET}>/$<TARGET_LINKER_FILE_NAME:${_SYM_TARGET}>
$<TARGET_LINKER_FILE_DIR:${_SYM_TARGET}>/${DEST_FILE}) $<TARGET_LINKER_FILE_DIR:${_SYM_TARGET}>/${DEST_FILE})
else() else()
add_custom_command(TARGET ${_SYM_TARGET} add_custom_command(TARGET ${_SYM_TARGET}