From 920dd078f3a25725a60a2396a49bacbcfcf7381e Mon Sep 17 00:00:00 2001 From: orbea Date: Sun, 22 Sep 2019 23:04:43 -0700 Subject: [PATCH] cmake: Only install fmt headers when SPDLOG_FMT_EXTERNAL is not defined. --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bfdc8df7..4f7b101b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,9 +184,14 @@ if (SPDLOG_INSTALL) #--------------------------------------------------------------------------------------- # Include files #--------------------------------------------------------------------------------------- - install(DIRECTORY include/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + install(DIRECTORY include/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" PATTERN "fmt/bundled" EXCLUDE) install(TARGETS spdlog spdlog_header_only EXPORT spdlog DESTINATION "${CMAKE_INSTALL_LIBDIR}/spdlog") + if(NOT SPDLOG_FMT_EXTERNAL) + install(DIRECTORY include/${PROJECT_NAME}/fmt/bundled/ + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/fmt/bundled/") + endif() + #--------------------------------------------------------------------------------------- # Package and version files #---------------------------------------------------------------------------------------