CMake Support in Qt Creator

Since Qt Creator 1.1, support for CMake project files is available. Qt Creator 1.3 supports the Microsoft Toolchain if the cmake version is at least 2.8.

Opening CMake Projects

To open a CMake project select Open from the File menu and select the CMakeLists.txt file from your CMake project. A wizard will guide you with the rest of the process. If the CMake project does not have an in-place build, Qt Creator lets you specify the directory in which the project is built (shadow build).

The screenshot below shows how you can specify command line arguments to CMake for your project.

Normally, there is no need to pass any command line arguments for projects that are already built, as CMake caches that information.

Building CMake Projects

Qt Creator builds CMake Projects by running make, mingw32-make, or nmake depending on your platform. The build errors and warnings are parsed and displayed in the Build Issues output pane.

By default Qt Creator builds the all target. You can specify which targets to build in Project mode, under Build Settings.