Qt Creator 16-CMake更新

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中,它是关于对空子目录进行分组的。

cmake-grouping-of-empty-directories

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语言的项目。

cmake-objc

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文件节点。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值