From bc674b4bb69b82a7057c0d23571ad421363a6723 Mon Sep 17 00:00:00 2001 From: Guillaume Egles Date: Fri, 25 Dec 2020 22:01:01 -0800 Subject: [PATCH] Only refer to the header-only version of spdlog (#61) --- CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 910cb56c..be7214c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,9 +74,15 @@ target_include_directories(spdlog_setup $ $) -target_link_libraries(spdlog_setup - INTERFACE - spdlog) +if(TARGET spdlog::spdlog_header_only) + target_link_libraries(spdlog_setup + INTERFACE + spdlog::spdlog_header_only) +else() + target_link_libraries(spdlog_setup + INTERFACE + spdlog) +endif() if(SPDLOG_SETUP_INSTALL) install(TARGETS spdlog_setup EXPORT spdlog_setup)