mirror of
https://github.com/ceph/ceph
synced 2025-01-20 10:01:45 +00:00
cmake: honor WITH_FMT_HEADER_ONLY with vendored fmt lib
We're using the vendored fmt lib when there is no system library available. However, there is an inconsistency: the WITH_FMT_HEADER_ONLY setting is ignored by the vendored library. In order to address this, we'll use the fmt-header-only alias if WITH_FMT_HEADER_ONLY is set. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
This commit is contained in:
parent
d40edd3ac0
commit
a09b70dfd8
@ -335,6 +335,9 @@ else()
|
||||
set(old_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
|
||||
set(BUILD_SHARED_LIBS FALSE)
|
||||
add_subdirectory(fmt)
|
||||
if (WITH_FMT_HEADER_ONLY)
|
||||
add_library(fmt::fmt ALIAS fmt-header-only)
|
||||
endif()
|
||||
set(BUILD_SHARED_LIBS ${old_BUILD_SHARED_LIBS})
|
||||
unset(old_BUILD_SHARED_LIBS)
|
||||
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/fmt/include")
|
||||
|
Loading…
Reference in New Issue
Block a user