CMakeプロジェクト内のファイルを管理する
プロジェクトに新規または既存のファイルを追加すると、Qt Creator はそれらをCMakeLists.txt ファイル内のqt_add_executable、add_executable、またはqt_add_library関数に自動的に追加します。
Qt Creator がターゲットの作成場所を認識できない場合、target_sources関数を使用してファイルを追加します。
Qt Quick プロジェクトの場合、ファイルはqt_add_qml_module関数に追加され、QML_FILES 、SOURCES 、またはRESOURCES 関数の引数の前にプレフィックスが付けられます。
「プロジェクト」ビューまたは「ファイルシステム」ビューでファイルの名前を変更したり削除したりすると、Qt Creator はそのファイルの名前をCMakeLists.txt ファイル内で変更するか、同ファイルから削除します。
「ファイルの追加」、「手順: CMake を使用したビルド」、「CMake」、「ファイルシステム」、「プロジェクト」も参照してください 。
Copyright © The Qt Company Ltd. and other contributors. 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.