From b8c291879aa513c56517d35c7d435c3e2e8934c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kubern=C3=A1t?= Date: Thu, 30 Nov 2023 14:37:06 +0100 Subject: [PATCH] qt5: Add UNICODE macros --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b3a03b2e..774f431bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,8 +126,12 @@ if(WITH_COREQT) set(Qt_FOUND ${Qt5_FOUND}) set(QtWidgets_FOUND ${Qt5Widgets_FOUND}) - function(qt_add_library) - add_library(${ARGV}) + function(qt_add_library target) + add_library(${target} ${ARGN}) + if(WIN32) + target_compile_definitions(${target} PRIVATE UNICODE) + target_compile_definitions(${target} PRIVATE _UNICODE) + endif() endfunction() function(qt_add_executable)