fix shared lib issues with bundled fmt

This commit is contained in:
Martin Vejdarski 2020-03-11 00:39:42 +07:00
parent 0ca2cb625e
commit 3b73278348

View File

@ -131,6 +131,9 @@ if (SPDLOG_BUILD_SHARED)
if(WIN32)
target_compile_options(spdlog PUBLIC /wd4251 /wd4275)
endif()
if(NOT SPDLOG_FMT_EXTERNAL AND NOT SPDLOG_FMT_EXTERNAL_HO)
target_compile_definitions(spdlog PRIVATE FMT_EXPORT PUBLIC FMT_SHARED)
endif()
else()
add_library(spdlog STATIC ${SPDLOG_SRCS} ${SPDLOG_ALL_HEADERS})
endif()