Install Bash completion script.
authorAndreas Schuh <andreas.schuh.84@gmail.com>
Thu, 1 Aug 2013 00:06:36 +0000 (01:06 +0100)
committerAndreas Schuh <andreas.schuh.84@gmail.com>
Thu, 1 Aug 2013 00:06:36 +0000 (01:06 +0100)
CMakeLists.txt

index eaffd83..b9d4f03 100644 (file)
@@ -137,10 +137,12 @@ add_library (gflags ${GFLAGS_SRCS})
 # ----------------------------------------------------------------------------
 # installation
 if (WIN32)
+  set (RUNTIME_INSTALL_DIR Bin)
   set (LIBRARY_INSTALL_DIR Lib)
   set (INCLUDE_INSTALL_DIR Include)
   set (CONFIG_INSTALL_DIR  CMake)
 else ()
+  set (RUNTIME_INSTALL_DIR bin)
   set (LIBRARY_INSTALL_DIR lib)
   set (INCLUDE_INSTALL_DIR include)
   set (CONFIG_INSTALL_DIR  lib/cmake/${PACKAGE_NAME})
@@ -166,6 +168,10 @@ install (
 
 install (EXPORT gflags-lib DESTINATION ${CONFIG_INSTALL_DIR} FILE ${PACKAGE_NAME}-export.cmake)
 
+if (UNIX)
+  install (PROGRAMS src/gflags_completions.sh DESTINATION ${RUNTIME_INSTALL_DIR})
+endif ()
+
 # ----------------------------------------------------------------------------
 # support direct use of build tree
 set (INSTALL_PREFIX_REL2CONFIG_DIR .)