blob: a1390b3ecc49401c1794c7c9b5296974e572bd98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
From 6728a7582bbd5f0ef37f8893cc0103f82c9fdc05 Mon Sep 17 00:00:00 2001
From: Millian Poquet <millian.poquet@inria.fr>
Date: Thu, 6 Dec 2018 20:01:15 +0100
Subject: [PATCH] install a pkg-config redox.pc file
---
CMakeLists.txt | 3 +++
cmake/redox.pc.in | 11 +++++++++++
2 files changed, 14 insertions(+)
create mode 100644 cmake/redox.pc.in
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 11887ad..54dfa35 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -193,6 +193,9 @@ endif()
if (lib)
# Install the dynamic library to /usr/lib[64]
install(TARGETS redox DESTINATION lib${LIB_SUFFIX})
+ # Generate the redox.pc pkg-config file in /usr/lib[64]/pkgconfig
+ configure_file("${CMAKE_HOME_DIRECTORY}/cmake/redox.pc.in" "${PROJECT_BINARY_DIR}/redox.pc" @ONLY)
+ install(FILES "${PROJECT_BINARY_DIR}/redox.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig/)
endif()
if (static_lib)
diff --git a/cmake/redox.pc.in b/cmake/redox.pc.in
new file mode 100644
index 0000000..a480d1f
--- /dev/null
+++ b/cmake/redox.pc.in
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${prefix}/lib@LIB_SUFFIX@
+includedir=${prefix}/include
+
+Name: redox
+Description: Modern, asynchronous, and wicked fast C++11 client for Redis
+Version: @REDOX_VERSION_STRING@
+
+Libs: -L${libdir} -lredox @HIREDIS_LIBRARIES@ @LIBEV_LIBRARIES@ @CMAKE_THREAD_LIBS_INIT@
+Cflags: -I${includedir}
|