qt_disable_unicode_defines

いくつかのユニコード関連のコンパイラ定義がターゲット上で自動的に設定されるのを防ぎます。

このコマンドはQt6 パッケージのCore コンポーネントで定義されています:

find_package(Qt6 REQUIRED COMPONENTS Core)

このコマンドは Qt 6.2 で導入されました。

概要

qt_disable_unicode_defines(target)

バージョンレスコマンドが無効になっている場合、代わりにqt6_disable_unicode_defines() を使用してください。このコマンドと同じ引数をサポートしています。

説明

Qt 6 では、Qt モジュールに対してリンクするターゲットに対して、UNICODE_UNICODE のコンパイラ定義がデフォルトで設定されます。これは qmake の動作と同じですが、Qt 5 の CMake API の動作と比べると変更されています。targetqt_disable_unicode_defines() を呼び出すと、これらのコンパイラ定義が自動的に設定されるのを防ぐことができます。

qt_allow_non_utf8_sources()も参照してください

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.