Skip to content

Commit

Permalink
logging: Allow to use spdlog from system if present
Browse files Browse the repository at this point in the history
  • Loading branch information
frantisekz committed Apr 26, 2024
1 parent 2333e0b commit ec725bc
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions source/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: MIT

include(FetchContent)
set(SPDLOG_REPO https://github.com/gabime/spdlog)
set(SPDLOG_TAG v1.13.0)
FetchContent_Declare(
spdlog
GIT_REPOSITORY ${SPDLOG_REPO}
GIT_TAG ${SPDLOG_TAG}
)
FetchContent_makeAvailable(spdlog)
find_package(spdlog)
if (NOT spdlog_FOUND)
include(FetchContent)
set(SPDLOG_REPO https://github.com/gabime/spdlog)
set(SPDLOG_TAG v1.13.0)
FetchContent_Declare(
spdlog
GIT_REPOSITORY ${SPDLOG_REPO}
GIT_TAG ${SPDLOG_TAG}
)
FetchContent_makeAvailable(spdlog)
endif (NOT spdlog_FOUND)

add_library(utils
STATIC
Expand Down

0 comments on commit ec725bc

Please sign in to comment.