qt_add_binary_resources
QtリソースファイルのリストからRCCファイルを作成します。
このコマンドはQt6
パッケージのCore
コンポーネントで定義されています:
find_package(Qt6 REQUIRED COMPONENTS Core)
このコマンドは Qt 5.10 で導入されました。
概要
qt_add_binary_resources(target file1.qrc [file2.qrc ...] [DESTINATION ...] [OPTIONS ...])
バージョンレスコマンドが無効になっている場合は、代わりにqt6_add_binary_resources()
を使用してください。このコマンドと同じ引数をサポートしています。
説明
Qt Resource ファイルをバイナリの.rcc
ファイルにコンパイルするカスタムtarget
を追加します。
引数
DESTINATION
生成される ファイルのパスを設定します。デフォルトは です。.rcc
${CMAKE_CURRENT_BINARY_DIR}/${target}.rcc
rcc
呼び出しに追加するOPTIONS
を設定できます。可能なオプションはrccのドキュメントを参照してください。
例
qt_add_binary_resources(resources project.qrc OPTIONS -no-compress) add_dependencies(myapp resources)
© 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.