mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 10:01:33 +08:00
Added SPDLOG_WCHAR_SUPPORT options to CMake under windows
This commit is contained in:
parent
ffb7c317b5
commit
8cc0997f79
@ -59,6 +59,11 @@ option(SPDLOG_SANITIZE_ADDRESS "Enable address sanitizer in tests" OFF)
|
||||
option(SPDLOG_INSTALL "Generate the install target." ${SPDLOG_MASTER_PROJECT})
|
||||
option(SPDLOG_FMT_EXTERNAL "Use external fmt library instead of bundled" OFF)
|
||||
|
||||
if(WIN32)
|
||||
option(SPDLOG_WCHAR_SUPPORT "Support wchar api" OFF)
|
||||
endif()
|
||||
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
|
||||
@ -109,6 +114,12 @@ if(SPDLOG_FMT_EXTERNAL)
|
||||
target_link_libraries(spdlog_header_only INTERFACE fmt::fmt)
|
||||
endif()
|
||||
|
||||
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()
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------------
|
||||
# Build binaries
|
||||
#---------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user