1
0
mirror of https://github.com/xmrig/xmrig.git synced 2026-02-02 02:03:03 -05:00

Allow using system libfmt

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
This commit is contained in:
Jean-Pierre De Jesus DIAZ
2023-05-29 14:09:58 +02:00
parent 65fc16d5ac
commit 0399b6b6bb
46 changed files with 32 additions and 15 deletions

14
cmake/fmt.cmake Normal file
View 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()