You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2024/01/29 09:03:08 UTC

(avro) branch main updated: AVRO-3932: [C] Search for `snappy.pc`

This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/main by this push:
     new 87e93a818 AVRO-3932: [C] Search for `snappy.pc`
87e93a818 is described below

commit 87e93a818d9c64c31ba62a862d83ec81405e8df8
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Mon Jan 29 10:58:03 2024 +0200

    AVRO-3932: [C] Search for `snappy.pc`
    
    This is what many of the Linux distros provide (e.g. Ubuntu and
    openEuler)
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
 .github/workflows/test-lang-c.yml | 1 -
 lang/c/CMakeLists.txt             | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/.github/workflows/test-lang-c.yml b/.github/workflows/test-lang-c.yml
index 8a5494db1..eaeaa1f94 100644
--- a/.github/workflows/test-lang-c.yml
+++ b/.github/workflows/test-lang-c.yml
@@ -52,7 +52,6 @@ jobs:
           mkdir -p build
           cd build
           cmake ..
-          cp /usr/lib/x86_64-linux-gnu/pkgconfig/snappy.pc src/libsnappy.pc
           export PKG_CONFIG_PATH=./src
           pkg-config --libs avro-c
 
diff --git a/lang/c/CMakeLists.txt b/lang/c/CMakeLists.txt
index 2956a07e8..9c7ad21b5 100644
--- a/lang/c/CMakeLists.txt
+++ b/lang/c/CMakeLists.txt
@@ -151,7 +151,7 @@ endif (ZLIB_FOUND)
 
 find_package(Snappy)
 if (SNAPPY_FOUND AND ZLIB_FOUND)  # Snappy borrows crc32 from zlib
-    set(SNAPPY_PKG libsnappy)
+    set(SNAPPY_PKG snappy)
     add_definitions(-DSNAPPY_CODEC)
     include_directories(${SNAPPY_INCLUDE_DIRS})
     message("Enabled snappy codec")