fetch spdlog if it's not found

This commit is contained in:
coco875
2025-08-06 09:16:54 -06:00
committed by Lywx
parent 6e6a0a8983
commit dcefe0bd5c
+10 -1
View File
@@ -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()