Skip to content

Commit f38ec6d

Browse files
committed
spdlog: Use system library if found
1 parent fd459f2 commit f38ec6d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ else()
7878
endif()
7979
add_definitions(-DLOADER_VERSION_SHA="${VERSION_SHA}")
8080

81-
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/third_party/spdlog_headers")
81+
find_package(spdlog CONFIG)
82+
if(NOT spdlog_FOUND)
83+
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/third_party/spdlog_headers")
84+
endif()
8285

8386
# Update other relevant variables to include the patch
8487
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")

source/utils/CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@ add_library(utils
77
"logging.cpp"
88
)
99

10-
target_include_directories(utils PRIVATE ${CMAKE_SOURCE_DIR}/third_party/spdlog_headers/)
10+
if(NOT spdlog_FOUND)
11+
target_include_directories(utils PRIVATE ${CMAKE_SOURCE_DIR}/third_party/spdlog_headers/)
12+
endif()
13+

0 commit comments

Comments
 (0)