@ -35,7 +35,7 @@ endif()
set ( CMAKE_CXX_EXTENSIONS OFF )
if ( CMAKE_SYSTEM_NAME MATCHES "CYGWIN" )
set ( CMAKE_CXX_EXTENSIONS ON )
set ( CMAKE_CXX_EXTENSIONS ON )
endif ( )
@ -148,9 +148,9 @@ target_link_libraries(spdlog_header_only INTERFACE Threads::Threads)
# U s e f m t p a c k a g e i f u s i n g e x t e r n a l f m t
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if ( SPDLOG_FMT_EXTERNAL OR SPDLOG_FMT_EXTERNAL_HO )
if ( NOT TARGET fmt::fmt )
find_package ( fmt REQUIRED)
endif ( )
if ( NOT TARGET fmt::fmt )
find_package ( fmt 6.1.2 REQUIRED)
endif ( )
target_compile_definitions ( spdlog PUBLIC SPDLOG_FMT_EXTERNAL )
target_compile_definitions ( spdlog_header_only INTERFACE SPDLOG_FMT_EXTERNAL )
@ -170,19 +170,18 @@ endif()
# M i s c d e f i n i t i o n s a c c o r d i n g t o t w e a k o p t i o n s
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if ( SPDLOG_WCHAR_SUPPORT )
target_compile_definitions ( spdlog PUBLIC SPDLOG_WCHAR_TO_UTF8_SUPPORT )
target_compile_definitions ( spdlog_header_only INTERFACE SPDLOG_WCHAR_TO_UTF8_SUPPORT )
endif ( )
if ( SPDLOG_WCHAR_FILENAMES )
target_compile_definitions ( spdlog PUBLIC SPDLOG_WCHAR_FILENAMES )
target_compile_definitions ( spdlog_header_only INTERFACE SPDLOG_WCHAR_FILENAMES )
endif ( )
target_compile_definitions ( spdlog PUBLIC SPDLOG_WCHAR_TO_UTF8_SUPPORT )
target_compile_definitions ( spdlog_header_only INTERFACE SPDLOG_WCHAR_TO_UTF8_SUPPORT )
endif ( )
if ( SPDLOG_NO_EXCEPTIONS )
target_compile_definitions ( spdlog PUBLIC SPDLOG_NO_EXCEPTIONS )
if ( SPDLOG_WCHAR_FILENAMES )
target_compile_definitions ( spdlog PUBLIC SPDLOG_WCHAR_FILENAMES )
target_compile_definitions ( spdlog_header_only INTERFACE SPDLOG_WCHAR_FILENAMES )
endif ( )
target_compile_definitions ( spdlog_header_only INTERFACE SPDLOG_NO_EXCEPTIONS )
if ( SPDLOG_NO_EXCEPTIONS )
target_compile_definitions ( spdlog PUBLIC SPDLOG_NO_EXCEPTIONS )
target_compile_definitions ( spdlog_header_only INTERFACE SPDLOG_NO_EXCEPTIONS )
if ( NOT MSVC )
target_compile_options ( spdlog PRIVATE -fno-exceptions )
@ -276,8 +275,9 @@ if (SPDLOG_INSTALL)
F I L E $ { c o n f i g _ t a r g e t s _ f i l e } )
include ( CMakePackageConfigHelpers )
configure_file ( "${project_config_in}" "${project_config_out}" @ONLY )
configure_package_config_file ( "${project_config_in}" "${project_config_out}"
I N S T A L L _ D E S T I N A T I O N $ { e x p o r t _ d e s t _ d i r }
)
write_basic_package_version_file ( "${version_config_file}" COMPATIBILITY SameMajorVersion )
install ( FILES
" $ { p r o j e c t _ c o n f i g _ o u t } "