Qt Creator 16 - CMake Update

Here are the new CMake changes in Qt Creator 16:

More feature parity with QMake projects

In Qt Creator 16, it is about grouping of empty subdirectories.

cmake-grouping-of-empty-directories

Objective C/C++ support

Qt Creator 16 properly loads projects that have the OBJC and OBJCXX languages explicitly set in CMake.

cmake-objc

Runnable configurations from CMake custom targets

Qt Creator creates runnable configurations for executables. But what happens if you have a plugin that you would want to test?

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 uses this feature for the Qt Creator Plugin Wizard.

  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

The change was done in Qt Creator 15 and it was not that well received 😅

Qt Creator 16 partially reverts this change.

Qt Creator 16 only keeps the associated CMakeLists.txt file node for targets that have the FOLDER property set.

ChangeLog

For all the CMake changes see Changelog # cmake.


Blog Topics:

Comments