Merge pull request #1241 from orbea/fmt

cmake: Only install fmt headers when SPDLOG_FMT_EXTERNAL is not defined.
This commit is contained in:
Gabi Melman 2019-09-23 10:25:48 +03:00 committed by GitHub
commit 4da95066a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,9 +189,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
#---------------------------------------------------------------------------------------