File tree 2 files changed +13
-7
lines changed
2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,10 @@ else()
78
78
endif ()
79
79
add_definitions (-DLOADER_VERSION_SHA="${VERSION_SHA} " )
80
80
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 ()
82
85
83
86
# Update other relevant variables to include the patch
84
87
set (PROJECT_VERSION "${PROJECT_VERSION_MAJOR} .${PROJECT_VERSION_MINOR} .${PROJECT_VERSION_PATCH} " )
Original file line number Diff line number Diff line change 1
1
# Copyright (C) 2024 Intel Corporation
2
2
# SPDX-License-Identifier: MIT
3
3
4
- add_library (utils
5
- STATIC
6
- "logging.h"
7
- "logging.cpp"
8
- )
4
+ set (logging_SOURCES logging.h logging.cpp)
5
+
6
+ if (NOT spdlog_FOUND)
7
+ add_library (utils STATIC ${logging_SOURCES} )
8
+ target_include_directories (utils PRIVATE ${CMAKE_SOURCE_DIR} /third_party/spdlog_headers/)
9
+ else ()
10
+ add_library (utils ${logging_SOURCES} )
11
+ target_link_libraries (utils spdlog::spdlog)
12
+ endif ()
9
13
10
- target_include_directories (utils PRIVATE ${CMAKE_SOURCE_DIR} /third_party/spdlog_headers/)
You can’t perform that action at this time.
0 commit comments