From a007403234a1d4923389cc7707b4e006f6fc03e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gell=C3=A9rt=20Peresztegi-Nagy?= Date: Mon, 12 Aug 2024 14:03:40 +0100 Subject: [PATCH] build: import fmt using find_package Since release 1.12 avro uses the fmt library instead of boost::format. This was introduced in https://github.com/apache/avro/commit/19501fc00ff1f18ecf9c65baf670dc92c0b64891. However, we want to avoid pulling in fmt using fetchcontent like the build currently does and instead we want to use find_package to reuse the existing fmt dependency in our vtools-based build. The version is fixed to the current fmt version used by the vtools build which works with the avro build. --- lang/c++/CMakeLists.txt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lang/c++/CMakeLists.txt b/lang/c++/CMakeLists.txt index bc709315707..bf703fdbfee 100644 --- a/lang/c++/CMakeLists.txt +++ b/lang/c++/CMakeLists.txt @@ -82,15 +82,7 @@ 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) +find_package(fmt 8.1.1 REQUIRED) find_package(Snappy) if (SNAPPY_FOUND)