From aaf58e2b495f1d4f8b6a207ec36e457e88a4beab Mon Sep 17 00:00:00 2001 From: Maarten Date: Sun, 4 Feb 2018 18:51:22 +0100 Subject: [PATCH] Set Unicode definitions for third party libraries in CMake build See https://github.com/wxWidgets/wxWidgets/pull/717 See #18077. --- build/cmake/functions.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build/cmake/functions.cmake b/build/cmake/functions.cmake index a3809a6259..23c68ee76d 100644 --- a/build/cmake/functions.cmake +++ b/build/cmake/functions.cmake @@ -407,6 +407,14 @@ function(wx_set_builtin_target_properties target_name) OUTPUT_NAME_DEBUG ${target_name}${lib_unicode}d ) endif() + + if(wxUSE_UNICODE) + if(WIN32) + target_compile_definitions(${target_name} PUBLIC UNICODE) + endif() + target_compile_definitions(${target_name} PUBLIC _UNICODE) + endif() + if(MSVC) # we're not interested in deprecation warnings about the use of # standard C functions in the 3rd party libraries (these warnings