File 0015-WITH_SYSTEM_FMT.patch of Package ceph-ceph-16.2.15
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a9aef68ed6d..000605b14d2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -305,11 +305,10 @@ include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/xxHash")
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/rapidjson/include")
option(WITH_FMT_HEADER_ONLY "use header-only version of fmt library" OFF)
-find_package(fmt 6.0.0 QUIET)
-if(fmt_FOUND)
- include_directories(SYSTEM "${fmt_INCLUDE_DIR}")
+option(WITH_SYSTEM_FMT "require and build with system fmt" OFF)
+if (WITH_SYSTEM_FMT)
+ find_package(fmt 6.0.0 REQUIRED)
else()
- message(STATUS "Could not find fmt, will build it")
set(old_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS FALSE)
add_subdirectory(fmt)