2021-06-17 21:32:24 +00:00
|
|
|
# Symlink Function
|
|
|
|
function(install_symlink target link)
|
2022-07-04 20:44:00 +00:00
|
|
|
get_filename_component(parent "${link}" DIRECTORY)
|
|
|
|
if(parent STREQUAL "")
|
|
|
|
set(parent ".")
|
|
|
|
endif()
|
|
|
|
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/symlink/${parent}")
|
|
|
|
file(CREATE_LINK "${target}" "${CMAKE_BINARY_DIR}/symlink/${link}" SYMBOLIC)
|
|
|
|
install(FILES "${CMAKE_BINARY_DIR}/symlink/${link}" DESTINATION "${parent}")
|
2021-06-17 21:32:24 +00:00
|
|
|
endfunction()
|