avro-c++: Fix build with boost 1.89+

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj
2025-08-30 18:37:32 -07:00
parent 7b7953f3a1
commit f301d94aeb
2 changed files with 52 additions and 1 deletions
@@ -0,0 +1,49 @@
From f7c76ff3d693e6df5693fcd2864101b9913b1a44 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Aug 2025 18:16:10 -0700
Subject: [PATCH] cmake: Port to work with boost 1.89+
boost 1.88 does not have boost system libs anymore
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
CMakeLists.txt | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 73596a6..42f4225 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,17 +80,20 @@ endif ()
find_package (Boost 1.38 REQUIRED
- COMPONENTS filesystem iostreams program_options regex system)
-
-include(FetchContent)
-FetchContent_Declare(
- fmt
- GIT_REPOSITORY https://github.com/fmtlib/fmt.git
- GIT_TAG 10.2.1
- GIT_PROGRESS TRUE
- USES_TERMINAL_DOWNLOAD TRUE
-)
-FetchContent_MakeAvailable(fmt)
+ COMPONENTS filesystem iostreams program_options regex)
+
+find_package(fmt)
+if (NOT fmt_FOUND)
+ include(FetchContent)
+ FetchContent_Declare(
+ fmt
+ GIT_REPOSITORY https://github.com/fmtlib/fmt.git
+ GIT_TAG 10.2.1
+ GIT_PROGRESS TRUE
+ USES_TERMINAL_DOWNLOAD TRUE
+ )
+ FetchContent_MakeAvailable(fmt)
+endif (NOT fmt_FOUND)
find_package(Snappy)
if (SNAPPY_FOUND)
@@ -10,7 +10,9 @@ DEPENDS = "boost"
SRC_URI = "git://github.com/apache/avro.git;branch=branch-1.12;protocol=https;name=avro-c++ \
git://github.com/fmtlib/fmt.git;branch=10.x;protocol=https;name=fmt;destsuffix=_deps/fmt-src \
file://0001-Remove-cpp-unittest-compilation.patch \
file://0002-Add-package-configuration-files.patch"
file://0002-Add-package-configuration-files.patch \
file://0001-cmake-Port-to-work-with-boost-1.89.patch \
"
SRCREV_FORMAT = "avro-c++ fmt"
SRCREV_avro-c++ = "8c27801dc8d42ccc00997f25c0b8f45f8d4a233e"