summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 324d592..a450c87 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -233,7 +233,16 @@ if(USE_STANDALONE)
FetchContent_MakeAvailable(spdlog)
target_link_libraries(${PROJECT_NAME} PRIVATE spdlog)
else()
- find_package(spdlog REQUIRED)
+ find_package(spdlog OPTIONAL)
+ if(NOT spdlog_FOUND)
+ FetchContent_Declare(
+ spdlog
+ GIT_REPOSITORY https://github.com/gabime/spdlog.git
+ GIT_TAG 7e635fca68d014934b4af8a1cf874f63989352b7
+ )
+
+ FetchContent_MakeAvailable(spdlog)
+ endif()
target_link_libraries(${PROJECT_NAME} PUBLIC spdlog::spdlog)
endif()