Path: blob/master/Auxiliary/bash-completion/CMakeLists.txt
5017 views
# We need to integrate into the system install, or this will silently fail to1# accomplish anything at all, and packagers won't even know it exists. Use the2# `<sharedir>/bash-completion/completions/` hierarchy by default, rooted in3# CMake's XDGDATA_DIR definition of the sharedir. This works with installation4# to `/usr` or `/usr/local` (or any prefix which bash-completion is configured5# with) as well as a simple installation by a local user into their home6# directory *if* the prefix is `$HOME/.local` since `.local/share/` is part of7# the bash-completion search path too.8# For more complex installations, packagers can set CMake_INSTALL_BASH_COMP_DIR9# to another system location.1011if(NOT CMake_INSTALL_BASH_COMP_DIR)12if(CMAKE_BASH_COMP_DIR)13# Honor previous customization option.14set(CMake_INSTALL_BASH_COMP_DIR "${CMAKE_BASH_COMP_DIR}")15else()16# Default.17set(CMake_INSTALL_BASH_COMP_DIR ${CMake_INSTALL_XDGDATA_DIR}/bash-completion/completions)18endif()19endif()20install(FILES cmake cpack ctest DESTINATION ${CMake_INSTALL_BASH_COMP_DIR})212223