diff --git a/CMakeLists.txt b/CMakeLists.txt index 39e6878f..ff996491 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,6 +66,7 @@ option(SPDLOG_FMT_EXTERNAL "Use external fmt library instead of bundled" OFF) if(WIN32) option(SPDLOG_WCHAR_SUPPORT "Support wchar api" OFF) + option(SPDLOG_WCHAR_FILENAMES "Support wchar filenames" OFF) endif() option(SPDLOG_NO_EXCEPTIONS "Compile with -fno-exceptions. Call abort() on any spdlog exceptions" OFF) @@ -143,6 +144,11 @@ if(SPDLOG_WCHAR_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() + if(SPDLOG_NO_EXCEPTIONS) target_compile_definitions(spdlog PUBLIC SPDLOG_NO_EXCEPTIONS)