File 0015-WITH_SYSTEM_FMT.patch of Package ceph-ceph-18.2.7
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e1f90f7..fa7dce0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -323,11 +323,10 @@ endif()
option(WITH_FMT_HEADER_ONLY "use header-only version of fmt library" OFF)
set(WITH_FMT_VERSION "8.1.1" CACHE
STRING "build with fmt version")
-find_package(fmt ${WITH_FMT_VERSION} 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 ${WITH_FMT_VERSION} QUIET)
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)