Prevents some unicode-related compiler definitions being set automatically on a target.
命令的定義在
Core
組件對於
Qt6
包,可以像這樣加載:
find_package(Qt6 REQUIRED COMPONENTS Core)
該命令在 Qt 6.2 引入。
qt_disable_unicode_defines(target)
若
無版本命令
被禁用,使用
qt6_disable_unicode_defines()
代替。它支持如此命令的一組相同自變量。
在 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() .