Prevents some unicode-related compiler definitions being set automatically on a target.
The command is defined in the
Core
组件对于
Qt6
package. Load the package with:
find_package(Qt6 COMPONENTS Core REQUIRED)
qt_disable_unicode_defines(target)
若
versionless commands
are disabled, use
qt6_disable_unicode_defines()
instead. It supports the same set of arguments as this command.
在 Qt 6,
UNICODE
and
_UNICODE
compiler definitions are set by default for targets that link against Qt modules. This is in line with the qmake behavior, but it is a change compared to the CMake API behavior in Qt 5. Calling
qt_disable_unicode_defines()
在
target
prevents these compiler definitions from being automatically set.
另请参阅 qt_allow_non_utf8_sources ().