Allow using system libfmt
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
This commit is contained in:
parent
65fc16d5ac
commit
0399b6b6bb
46 changed files with 32 additions and 15 deletions
14
cmake/fmt.cmake
Normal file
14
cmake/fmt.cmake
Normal file
|
@ -0,0 +1,14 @@
|
|||
# SPDX-FileCopyrightText: © 2023 Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
find_package(fmt QUIET)
|
||||
|
||||
if(fmt_FOUND)
|
||||
set(FMT_LIBRARY fmt::fmt)
|
||||
else()
|
||||
message(STATUS "Using bundled fmt library")
|
||||
add_library(fmt INTERFACE)
|
||||
target_sources(fmt INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/src/3rdparty/fmt/format.cc)
|
||||
target_include_directories(fmt INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/src/3rdparty/fmt)
|
||||
set(FMT_LIBRARY fmt)
|
||||
endif()
|
Loading…
Add table
Add a link
Reference in a new issue