README: Add cmake usage example

master
Ville Skyttä 2015-02-15 10:45:13 +02:00
parent 3a8e7bd0fe
commit 889718be68
1 changed files with 14 additions and 1 deletions

15
README
View File

@ -139,7 +139,20 @@ Q. I author/maintain package X and would like to maintain my own
dist_bashcomp_DATA = # completion files go here
For cmake we ship the bash-completion-config.cmake and
bash-completion-config-version.cmake files.
bash-completion-config-version.cmake files. Example usage:
find_package(bash-completion)
if(BASH_COMPLETION_FOUND)
message(STATUS
"Using bash completion dir ${BASH_COMPLETION_COMPLETIONSDIR}")
else()
set (BASH_COMPLETION_COMPLETIONSDIR "/etc/bash_completion.d")
message (STATUS
"Using fallback bash completion dir ${BASH_COMPLETION_COMPLETIONSDIR}")
endif()
install(FILES your-completion-file DESTINATION
${BASH_COMPLETION_COMPLETIONSDIR})
Q. I use CVS in combination with passwordless ssh access to my remote
repository. How can I have the cvs command complete on remotely