Zarządzanie plikami w projektach CMake
Po dodaniu nowych lub istniejących plików do projektu narzędzie Qt Creator automatycznie dodaje je do funkcji qt_add_executable, add_executable lub qt_add_library w pliku CMakeLists.txt.
Jeśli Qt Creator nie rozpozna, gdzie tworzony jest cel, użyje funkcji ` target_sources ` do dodania plików.
W przypadku projektów Qt Quick pliki są dodawane do funkcji qt_add_qml_module z prefiksem argumentu funkcji QML_FILES, SOURCES lub RESOURCES.
Po zmianie nazwy lub usunięciu plików w widoku „Projekty” lub „System plików ” program „ Qt Creator ” zmienia ich nazwy w pliku CMakeLists.txt lub usuwa je z niego.
Zobacz także: Dodawanie plików, Jak: Kompilacja za pomocą CMake, CMake, System plików i Projekty.
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.