summarylogtreecommitdiffstats
path: root/0001-Add-pkgconfig.patch
diff options
context:
space:
mode:
Diffstat (limited to '0001-Add-pkgconfig.patch')
-rw-r--r--0001-Add-pkgconfig.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/0001-Add-pkgconfig.patch b/0001-Add-pkgconfig.patch
new file mode 100644
index 000000000000..6c3952bdf11e
--- /dev/null
+++ b/0001-Add-pkgconfig.patch
@@ -0,0 +1,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)