Add an optional parameter to `llvm_install_symlink` which allows the symlink
installation to be placed into a specific component rather than the default
value.
llvm-svn: 288600
endfunction()
function(llvm_install_symlink name dest)
- cmake_parse_arguments(ARG "ALWAYS_GENERATE" "" "" ${ARGN})
+ cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN})
foreach(path ${CMAKE_MODULE_PATH})
if(EXISTS ${path}/LLVMInstallSymlink.cmake)
set(INSTALL_SYMLINK ${path}/LLVMInstallSymlink.cmake)
endif()
endforeach()
- if(ARG_ALWAYS_GENERATE)
- set(component ${dest})
+ if(ARG_COMPONENT)
+ set(component ${ARG_COMPONENT})
else()
- set(component ${name})
+ if(ARG_ALWAYS_GENERATE)
+ set(component ${dest})
+ else()
+ set(component ${name})
+ endif()
endif()
set(full_name ${name}${CMAKE_EXECUTABLE_SUFFIX})