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: Dylan Baker <[email protected]> --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b822934..cc7929c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -208,6 +208,8 @@ find_package(PythonNumpy 1.6.2 REQUIRED) find_package(PythonMako 0.8.0 REQUIRED) find_package(PythonSix 1.4.0 REQUIRED) +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 @@ -518,6 +520,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 () -- 2.7.1 _______________________________________________ Piglit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/piglit
