Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qt_disable_unicode_defines.qdoc
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5\page qt-disable-unicode-defines.html
6\ingroup cmake-commands-qtcore
7
8\title qt_disable_unicode_defines
9\keyword qt6_disable_unicode_defines
10
11\summary {Prevents some unicode-related compiler definitions being set automatically on a target.}
12
13\include cmake-find-package-core.qdocinc
14
15\cmakecommandsince 6.2
16
17\section1 Synopsis
18
19\badcode
20qt_disable_unicode_defines(target)
21\endcode
22
23\versionlessCMakeCommandsNote qt6_disable_unicode_defines()
24
25\section1 Description
26
27In Qt 6, the \c UNICODE and \c{_UNICODE} compiler definitions are set by
28default for targets that link against Qt modules. This is in line with the
29qmake behavior, but it is a change compared to the CMake API behavior in Qt 5.
30Calling \c{qt_disable_unicode_defines()} on a \c target prevents these compiler
31definitions from being automatically set.
32
33\sa {qt6_allow_non_utf8_sources}{qt_allow_non_utf8_sources()}
34*/