Commit 1b5fb027 authored by Dylan Baker's avatar Dylan Baker

CMake: install bash completions

This uses the bash-completion cmake file provided by bash-completions to
install the file to the system (if one does a system install). Otherwise
one can just copy the file to somewhere it will get sourced by their
bashrc.
Signed-off-by: default avatarDylan Baker <dylanx.c.baker@intel.com>
parent 0e1d7802
......@@ -216,6 +216,8 @@ else ()
find_package(PythonMako 0.8.0 REQUIRED)
endif (PYTHON_VERSION_STRING VERSION_GREATER 3.4.999999)
find_package(bash-completion CONFIG)
# Default to compiling with debug information (`gcc -g`):
if(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Debug CACHE STRING
......@@ -527,6 +529,13 @@ install (
REGEX "CMakeFiles|CMakeLists" EXCLUDE
)
if (BASH_COMPLETION_FOUND)
install(
FILES completions/bash/piglit
DESTINATION ${CMAKE_INSTALL_PREFIX}/${BASH_COMPLETION_COMPLETIONSDIR}/
)
endif (BASH_COMPLETION_FOUND)
if (WIN32)
set (PYTHON_SUFFIX ".py")
else ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment