Qt Creator 16 - CMake Update
Qt Creator 16-CMake更新
March 20, 2025 by Cristian Adam | Comments
2025年3月20日 克里斯蒂安·亚当|评论
Here are the new CMake changes in Qt Creator 16:
以下是Qt Creator 16中CMake的新变化:
More feature parity with QMake projects
与QMake项目具有更多同等功能
In Qt Creator 16, it is about grouping of empty subdirectories.
在Qt Creator 16中,它是关于对空子目录进行分组的。
Objective C/C++ support
Objective C/C++支持
Qt Creator 16 properly loads projects that have the OBJC
and OBJCXX
languages explicitly set in CMake.
Qt Creator 16可以正确加载在CMake中显式设置了OBJC和OBJCXX语言的项目。
Runnable configurations from CMake custom targets
可从CMake自定义目标运行配置
Qt Creator creates runnable configurations for executables. But what happens if you have a plugin that you would want to test?
Qt Creator为可执行文件创建可运行的配置。但是,如果有一个想要测试的插件,会发生什么?
Qt Creator 16 will create a Run configuration for the add_custom_target
targets that have the qtc_runnable
value set for the FOLDER
target property.
Qt Creator 16将为add_custom_target目标创建一个Run配置,这些目标为FOLDER目标属性设置了qtc_runable值。
Qt Creator uses this feature for the Qt Creator Plugin Wizard.
Qt Creator将此功能用于Qt Creator插件向导。
add_custom_target(RunQtCreator COMMAND ${QtCreatorExecutable} -pluginpath $<TARGET_FILE_DIR:Testplugin> DEPENDS Testplugin ) set_target_properties(RunQtCreator PROPERTIES FOLDER "qtc_runnable")
CMake targets and the associated CMakeLists.txt file node
CMake目标和相关的CMakeLists.txt文件节点
The change was done in Qt Creator 15 and it was not that well received 😅
这一变化是在Qt Creator 15中完成的,并没有那么受欢迎😅
Qt Creator 16 partially reverts this change.
Qt Creator 16部分恢复了这一更改。
Qt Creator 16 only keeps the associated CMakeLists.txt
file node for targets that have the FOLDER property set.
Qt Creator 16仅为设置了FOLDER属性的目标保留相关联的CMakeLists.txt文件节点。