Fájlok kezelése CMake-projektekben

Amikor új vagy meglévő fájlokat ad hozzá egy projekthez, a Qt Creator automatikusan hozzáadja azokat a qt_add_executable, add_executable vagy qt_add_library függvényhez az CMakeLists.txt fájlban.

Ha az Qt Creator nem tudja felismerni, hol jön létre a cél, akkor a target_sources függvényt használja a fájlok hozzáadásához.

Qt Quick -projektek esetében a fájlok a qt_add_qml_module függvényhez kerülnek hozzáadásra, az QML_FILES, SOURCES vagy RESOURCES függvényargumentum előtagjával.

Ha a Projects vagy a File System nézetben átnevez vagy eltávolít fájlokat, az Qt Creator átnevezi azokat a CMakeLists.txt fájlban, illetve eltávolítja onnan.

Lásd még :Fájlok hozzáadása, Hogyan: Összeállítás CMake-kel, CMake, Fájlrendszer és Projektek.

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.