summarylogtreecommitdiffstats
path: root/0001-Add-pkgconfig.patch
blob: 6c3952bdf11e7d7e4fce1cc9bc9281cc2680bd27 (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
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -187,6 +187,12 @@
   "${PROJECT_BINARY_DIR}/config.h"
 )
 
+configure_file(
+  "${CMAKE_CURRENT_SOURCE_DIR}/snappy.pc.in"
+  "${CMAKE_CURRENT_BINARY_DIR}/snappy.pc"
+  @ONLY
+)
+
 # We don't want to define HAVE_ macros in public headers. Instead, we use
 # CMake's variable substitution with 0/1 variables, which will be seen by the
 # preprocessor as constants.
@@ -395,4 +401,8 @@
       "${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake"
     DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
   )
+  install(
+    FILES "${PROJECT_BINARY_DIR}/snappy.pc"
+    DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
+  )
 endif(SNAPPY_INSTALL)