mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-24 17:41:34 +08:00
When built with SPDLOG_FMT_EXTERNAL_HO consumers of the spdlog targets depend on fmt
The cmake/spdlogConfig.cmake.in file properly takes into account the fmt package dependency when building with SPDLOG_FMT_EXTERNAL:BOOL=ON but not when built with SPDLOG_FMT_EXTERNAL_HO:BOOL=ON. Prior to these changes SPDLOG_FMT_EXTERNAL_HO:BOOL=ON results in exported targets with INTERFACE_LINK_LIBRARIES that contain fmt::fmt-header-only. As such, the installed spdlogConfig.cmake file should attempt to find that dependency for the consumer.
This commit is contained in:
parent
2f2d04b3e8
commit
69cac816aa
@ -6,9 +6,10 @@
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
set(SPDLOG_FMT_EXTERNAL @SPDLOG_FMT_EXTERNAL@)
|
||||
set(SPDLOG_FMT_EXTERNAL_HO @SPDLOG_FMT_EXTERNAL_HO@)
|
||||
set(config_targets_file @config_targets_file@)
|
||||
|
||||
if(SPDLOG_FMT_EXTERNAL)
|
||||
if(SPDLOG_FMT_EXTERNAL OR SPDLOG_FMT_EXTERNAL_HO)
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(fmt CONFIG)
|
||||
endif()
|
||||
@ -16,4 +17,4 @@ endif()
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/${config_targets_file}")
|
||||
|
||||
check_required_components(spdlog)
|
||||
check_required_components(spdlog)
|
||||
|
Loading…
Reference in New Issue
Block a user