cmake: add option to use symlinking instead of copying (#1185)
Windows only supports symlinking as admin or in developer mode. This commit adds a cmake flag to use symlinking instead of copying. When enabled, it will check for support and output a hint to enable developer mode when it fails. By default, it is disabled on Windows, and enabled otherwise.
This commit is contained in:
@@ -46,11 +46,11 @@ add_custom_command(
|
||||
# Copy the shader library next to the executable
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${WICKED_ROOT_DIR}/WickedEngine/${LIB_DXCOMPILER} ${CMAKE_CURRENT_BINARY_DIR}
|
||||
# Copy the resources
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/images ${CMAKE_CURRENT_BINARY_DIR}/images
|
||||
COMMAND ${CMAKE_COMMAND} -E ${COPY_OR_SYMLINK_DIR_CMD} ${CMAKE_CURRENT_SOURCE_DIR}/images ${CMAKE_CURRENT_BINARY_DIR}/images
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/test_script.lua ${CMAKE_CURRENT_BINARY_DIR}/test_script.lua
|
||||
# Copy font test resources
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/yumin.ttf ${CMAKE_CURRENT_BINARY_DIR}/
|
||||
|
||||
COMMENT "Copying Tests resources"
|
||||
COMMENT "$<IF:$<BOOL:${WICKED_USE_SYMLINKS}>,Symlinking,Copying> Tests resources"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user