[Bash-completion-devel] [PATCH][RFC] Cmake config for bash-completion

Igor Murzov intergalactic.anonymous at gmail.com
Sun Mar 18 21:07:07 UTC 2012


Hi, list.

Can we add configs for cmake to bash-completion? This will allow
projects using cmake to get information about bash-completion.
This works much like pkg-config files. I wrote two required files,
but I don't have sufficient knowledge about autotools and I don't
know how to add them to Makefile.am properly. What we need to do
is to process the files the same way as bash-completion.pc.in and
then copy result to /usr/share/cmake/bash-completion/. Can somebody
do this?



From 3ed8df5f6495725620bd930b576b9e085df549df Mon Sep 17 00:00:00 2001
From: Igor Murzov <e-mail at date.by>
Date: Mon, 19 Mar 2012 00:49:57 +0400
Subject: [PATCH] Add config for cmake to bash-completion.

This will allow projects using cmake to get information about
bash-completion. This works much like pkg-config files.
---
 bash-completion-config-version.cmake.in |    7 +++++++
 bash-completion-config.cmake.in         |   11 +++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
 create mode 100644 bash-completion-config-version.cmake.in
 create mode 100644 bash-completion-config.cmake.in

diff --git a/bash-completion-config-version.cmake.in b/bash-completion-config-version.cmake.in
new file mode 100644
index 0000000..265e075
--- /dev/null
+++ b/bash-completion-config-version.cmake.in
@@ -0,0 +1,7 @@
+set (PACKAGE_VERSION "@VERSION@")
+if (NOT ${PACKAGE_FIND_VERSION} VERSION_GREATER ${PACKAGE_VERSION})
+  set (PACKAGE_VERSION_COMPATIBLE 1)
+  if (${PACKAGE_FIND_VERSION} VERSION_EQUAL ${PACKAGE_VERSION})
+    set (PACKAGE_VERSION_EXACT 1)
+  endif ()
+endif ()
diff --git a/bash-completion-config.cmake.in b/bash-completion-config.cmake.in
new file mode 100644
index 0000000..402b7b6
--- /dev/null
+++ b/bash-completion-config.cmake.in
@@ -0,0 +1,11 @@
+# config file for bash-completion
+# http://bash-completion.alioth.debian.org/
+
+set (BASH_COMPLETION_VERSION "@VERSION@")
+
+set (BASH_COMPLETION_PREFIX "@prefix@")
+set (BASH_COMPLETION_COMPATDIR "@compatdir@")
+set (BASH_COMPLETION_COMPLETIONSDIR "@datarootdir@/@PACKAGE@/completions")
+set (BASH_COMPLETION_HELPERSDIR "@datarootdir@/@PACKAGE@/helpers")
+
+set (BASH_COMPLETION_FOUND "TRUE")
-- 
1.7.5.1




More information about the Bash-completion-devel mailing list