Minecraft: Pi Edition Modding Project
https://discord.com/invite/aDqejQGMMy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
661 B
20 lines
661 B
# Symlink Function |
|
function(install_symlink target link) |
|
install(CODE "\ |
|
# Prepare\n \ |
|
set(file \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${link}\")\n \ |
|
\ |
|
# Create Directory\n \ |
|
get_filename_component(dir \"\${file}\" DIRECTORY)\n \ |
|
file(MAKE_DIRECTORY \${dir})\n \ |
|
\ |
|
# Create Symlink\n \ |
|
if(NOT EXISTS \"\${file}\")\n \ |
|
execute_process(COMMAND \${CMAKE_COMMAND} -E create_symlink ${target} \"\${file}\")\n \ |
|
message(\"-- Installing: \${file}\")\n \ |
|
else()\n \ |
|
message(\"-- Up-to-date: \${file}\")\n \ |
|
endif() \ |
|
") |
|
endfunction() |
|
|
|
|