Qt Creator 11-CMake更新

Qt Creator 11 - CMake update

Qt Creator 11-CMake更新

June 14, 2023 by Cristian Adam | Comments

​2023年六月14日,克里斯蒂安·亚当|评论

Below, you have two new CMake features in Qt Creator 11:

下面,您在Qt Creator 11中有两个新的CMake功能:

Project file management

项目档案管理

With Qt Creator 11, it is possible to add new / existing files to a CMake target. Renaming and deleting of source files via the project tree is also supported.

使用Qt Creator 11,可以向CMake目标添加新的/现有的文件。还支持通过项目树重命名和删除源文件。

Qt Creator will look after the add_executableadd_libraryqt_add_executableqt_add_library function calls and add the source / resource files at the end.

Qt Creator将负责add_executable、add_library、qt_add_executive和qt_add_library函数的调用,并在最后添加源/资源文件。

If a custom CMake API is being used, a target_sources function call will be used instead.

如果正在使用自定义CMake API,则将使用target_sources函数调用。

Widgets Example

Widgets示例

Qt Quick Example

Qt Quick示例

For Qt Quick projects the qt_add_qml_module function is located. The added files will be prefixed with QML_FILESSOURCES or RESOURCES function arguments.

对于Qt Quick项目,qt_add_qml_module函数定位。添加的文件将以QML_FILES、SOURCES或RESOURCES函数参数为前缀。

CMakePresets reloading

CMakePresets重新加载

Qt Creator 11 will display a CMake Presets project tree item for quicker CMake Presets access.

Qt Creator 11将显示CMake Presets项目树项,以便更快地访问CMake预设。

In the Build menu, there is a Reload CMake Presets entry which will re-create the Kits from the CMakePresets json files.

在Build(构建)菜单中,有一个Reload CMake Presets(重新加载CMake预设)条目,它将从CMakePresets json文件重新创建工具包。

你可能感兴趣的:(QtBlog,qt)