Added support for creating symlinks to fdbbackup within bin and packages/bin directory

This commit is contained in:
Alvin Moore 2019-12-10 11:35:18 -08:00
parent 53ea319ec7
commit aece864143
2 changed files with 22 additions and 0 deletions

View File

@ -79,6 +79,20 @@ function(install_symlink)
endif()
endfunction()
function(install_package_symlink)
if (NOT WIN32)
set(options "")
set(one_value_options LOCATION SOURCE)
set(multi_value_options TARGETS)
cmake_parse_arguments(SYM "${options}" "${one_value_options}" "${multi_value_options}" "${ARGN}")
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${SYM_LOCATION})
foreach(component IN LISTS SYM_TARGETS)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SYM_SOURCE} ${CMAKE_BINARY_DIR}/${SYM_LOCATION}/${component})
endforeach()
endif()
endfunction()
# 'map' from (destination, package) to path
# format vars like install_destination_for_${destination}_${package}
set(install_destination_for_bin_tgz "bin")

View File

@ -30,6 +30,14 @@ if(NOT OPEN_FOR_IDE)
LINK_DIR bin
FILE_NAME fdbbackup
LINK_NAME fdbdr)
install_package_symlink(
LOCATION packages/bin
SOURCE fdbbackup
TARGETS fdbdr dr_agent backup_agent fdbrestore)
install_package_symlink(
LOCATION bin
SOURCE fdbbackup
TARGETS fdbdr dr_agent backup_agent fdbrestore)
endif()
if (GPERFTOOLS_FOUND)