minecraft-pi-docker/cmake/util.cmake

11 lines
416 B
CMake
Raw Permalink Normal View History

2021-06-17 21:32:24 +00:00
# Symlink Function
function(install_symlink target link)
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()