From d513f44a181adf3b76952397d394cb8996e0857d Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 13 Jan 2024 16:23:15 +0200 Subject: [PATCH] Fix cmake install again --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 414e77ef..2b510445 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -353,8 +353,14 @@ if(SPDLOG_INSTALL) # Include files # --------------------------------------------------------------------------------------- install(DIRECTORY include/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + + if(NOT SPDLOG_USE_STD_FORMAT) + set(FMT_TARGET "fmt") + else () + set(FMT_TARGET "") + endif() install( - TARGETS spdlog fmt + TARGETS spdlog ${FMT_TARGET} EXPORT spdlog LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}