このページでは

QML 向けの CMake ポリシー

Qt Qml には、QML関連のCMakeコマンドのバックワード互換性や動作を制御するための、いくつかのCMakeポリシーが提供されています。

利用可能なポリシー

  • QTP0001- QML モジュールのバージョン管理の挙動を制御します
  • QTP0004- QML モジュールの出力ディレクトリ構造を制御します
  • QTP0005- QML 型の登録動作を制御します

ポリシーの設定

qt_policy() またはcmake_policy() を使用して、CMakeLists.txt 内でこれらのポリシーを設定します:

qt_policy(SET QTP0001 NEW)

「QML 向け CMake 統合」および「qt_add_qml_module」も参照してください 。

© 2026 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.