[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/3] Add pkg-config file libssh.pc


Hi,

Just tried to add the installation of libssh.pc file. Please see the
patch.

Thanks,

Vic

From e644feece61f5036aa4932e0894bee295330f685 Mon Sep 17 00:00:00 2001
From: Vic Lee <llyzs@xxxxxxx>
Date: Wed, 30 Dec 2009 13:34:17 +0800
Subject: [PATCH 3/3] Add pkg-config file libssh.pc


Signed-off-by: Vic Lee <llyzs@xxxxxxx>
---
 CMakeLists.txt  |   11 +++++++++++
 libssh.pc.cmake |    6 ++++++
 2 files changed, 17 insertions(+), 0 deletions(-)
 create mode 100644 libssh.pc.cmake

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7891161..89eb1e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,6 +66,17 @@ add_subdirectory(tests)
 # build samples
 include_directories(${CMAKE_SOURCE_DIR}/include)
 
+# pkg-config file
+configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc)
+install(
+  FILES
+    ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc
+  DESTINATION
+    ${LIB_INSTALL_DIR}/pkgconfig
+  COMPONENT
+    pkgconfig
+)
+
 if (UNIX AND NOT WIN32)
   add_subdirectory(examples)
 
diff --git a/libssh.pc.cmake b/libssh.pc.cmake
new file mode 100644
index 0000000..3b1cb8d
--- /dev/null
+++ b/libssh.pc.cmake
@@ -0,0 +1,6 @@
+Name: ${APPLICATION_NAME}
+Description: The SSH Library
+Version: ${APPLICATION_VERSION}
+Libs: -L${LIB_INSTALL_DIR} -lssh
+Cflags: -I${INCLUDE_INSTALL_DIR}
+
-- 
1.6.5


Archive administrator: postmaster@lists.cynapses.org