Importing a CMake project into Qt Creator is easier than it is with Eclipse (which is described here). The problem is that you cannot do this properly by using the Import option. Counter-intuitively, you need to Open Project to import a CMake project and make a Qt Creator project from it. After this operation, the project will be available in Qt Creator always, with auto-complete (thanks to indexing) and building (thanks to
To do this:
- Do Open file or project and open the
- Choose the Build directory properly. Qt Creator will create a
.cbpfile here with the name of the CMake project.
- Qt Creator will ask you to run
cmakeonce, so that it can learn the include, library and build directories.
- You are now in the project Qt Creator has created for you. It will index the files perfectly, so you get excellent auto-complete (better than Eclipse).
- Click the Projects button in left column and you will be able to set the command options to build and the environment variables for build.
Tried with: Qt Creator 3.5.0 and Ubuntu 14.04