File 0015-WITH_SYSTEM_FMT.patch of Package ceph-ceph-17.2.9

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b03f76bff80..cdea6a40d92 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -296,11 +296,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)
openSUSE Build Service is sponsored by