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 08:54:35 UTC
(avro) branch branch-1.11 updated: AVRO-3932: [C] fix variable reference in CMakeLists.txt (#2713)
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch branch-1.11
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/branch-1.11 by this push:
new 335b46a83 AVRO-3932: [C] fix variable reference in CMakeLists.txt (#2713)
335b46a83 is described below
commit 335b46a8313dde774382e5b34f01dd58ae9ae97d
Author: Wenkang Zhang <31...@qq.com>
AuthorDate: Mon Jan 29 16:54:14 2024 +0800
AVRO-3932: [C] fix variable reference in CMakeLists.txt (#2713)
AVRO-3932: [C] fix variable reference in CMakeLists.txt
Check that `pkg-config --libs avro-c` does not produce errors
Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---------
Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
Co-authored-by: Martin Tzvetanov Grigorov <mg...@apache.org>
(cherry picked from commit 4e03a4c21d120b55acf16340ba122c6878ffdc6c)
---
.github/workflows/test-lang-c.yml | 9 +++++++++
lang/c/CMakeLists.txt | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/test-lang-c.yml b/.github/workflows/test-lang-c.yml
index 68c285ae3..f90396cb9 100644
--- a/.github/workflows/test-lang-c.yml
+++ b/.github/workflows/test-lang-c.yml
@@ -47,6 +47,15 @@ jobs:
- name: Test
run: ./build.sh test
+ - name: Check pkg-config
+ run: |
+ 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
+
- name: Cache Local Maven Repository
uses: actions/cache@v4
with:
diff --git a/lang/c/CMakeLists.txt b/lang/c/CMakeLists.txt
index aa923e182..2956a07e8 100644
--- a/lang/c/CMakeLists.txt
+++ b/lang/c/CMakeLists.txt
@@ -176,7 +176,7 @@ else (LZMA_FOUND)
endif (LZMA_FOUND)
set(CODEC_LIBRARIES ${ZLIB_LIBRARIES} ${LZMA_LIBRARIES} ${SNAPPY_LIBRARIES})
-set(CODEC_PKG "@ZLIB_PKG@ @LZMA_PKG@ @SNAPPY_PKG@")
+set(CODEC_PKG "${ZLIB_PKG} ${LZMA_PKG} ${SNAPPY_PKG}")
# Jansson JSON library
pkg_check_modules(JANSSON jansson>=2.3)