Package: croaring / 0.2.66+ds-2

0002-Generate-and-install-pkg-config-metadata-235.patch Patch series | download
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
43
44
45
46
47
From: Simon McVittie <smcv@debian.org>
Date: Fri, 7 Aug 2020 21:17:12 +0100
Subject: Generate and install pkg-config metadata (#235)

This provides a way for dependent projects with non-CMake build
systems to locate libroaring. Multiple build systems can read these
files, either directly (like Meson) or via the pkg-config or pkgconf
tools (like Autotools).

Signed-off-by: Simon McVittie <smcv@debian.org>
---
 CMakeLists.txt |  4 ++++
 roaring.pc.in  | 10 ++++++++++
 2 files changed, 14 insertions(+)
 create mode 100644 roaring.pc.in

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 54de391..b2e91df 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,6 +43,10 @@ find_package(CTargets)
 find_package(Options)
 find_package(LTO)
 
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/roaring.pc.in"
+               "${CMAKE_CURRENT_BINARY_DIR}/roaring.pc" @ONLY)
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/roaring.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+
 ## C header files get installed to /usr/local/include/roaring typically
 install(DIRECTORY include/${ROARING_LIB_NAME} DESTINATION include)
 
diff --git a/roaring.pc.in b/roaring.pc.in
new file mode 100644
index 0000000..e3b2391
--- /dev/null
+++ b/roaring.pc.in
@@ -0,0 +1,10 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+
+Name: roaring
+Description: Roaring bitmap implementation in C
+Version: @ROARING_LIB_VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lroaring