Skip to content

Commit

Permalink
Only refer to the header-only version of spdlog (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
gegles authored Dec 26, 2020
1 parent 804cd7c commit bc674b4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,15 @@ target_include_directories(spdlog_setup
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>)

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)
Expand Down

0 comments on commit bc674b4

Please sign in to comment.