From: Kefu Chai Date: Wed, 14 Dec 2022 14:48:46 +0000 (+0800) Subject: cmake: add an option named WITH_FMT_VERSION X-Git-Tag: v18.1.0~629^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=051ec194df16927187cbe4b26dacd06c31fa186a;p=ceph.git cmake: add an option named WITH_FMT_VERSION so we can optionally force cmake to use the fmt submodule even if fmtlib is available in system. Signed-off-by: Kefu Chai --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4297239121019..f29d173b3cdf3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -321,7 +321,8 @@ if(NOT TARGET RapidJSON::RapidJSON) endif() option(WITH_FMT_HEADER_ONLY "use header-only version of fmt library" OFF) -find_package(fmt 7.0.0 QUIET) +option(WITH_FMT_VERSION "build with fmt version" 7.0.0) +find_package(fmt ${WITH_FMT_VERSION} QUIET) if(fmt_FOUND) include_directories(SYSTEM "${fmt_INCLUDE_DIR}") else()