mirror of
https://github.com/izzy2lost/Torch.git
synced 2026-07-06 00:18:35 -07:00
fetch spdlog if it's not found
This commit is contained in:
+10
-1
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user