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)