Important: Please read the Qt Code of Conduct -

QtCreator cmake/ninja qmakespec problem when building project with Qt4.8

  • I have a project that uses Qt4.8, and carries the source code for Qt4.8 with it. It builds its own qmake locally, and then uses that to build other parts of the project. The project build is managed using cmake. The problem I specifically have is when I try to generate using CodeBlocks-Ninja (so that QtCreator can parse a ninja build).

    I have QtCreator 4.0.2 installed with 5.7 and 5.6. When I run cmake from command line it works. When I build from command line, it works. When I open the project in QtCreator, and it runs cmake, I get an error that it can't determine qmakespec (which it should get from the build directory it's in). If I specify the exact location of the qmakespec in the project kit, it works okay, but this is onerous if I move to a new build location, change build parameters, etc. I suspect that QtCreator is trying to get qmakespec from the Qt versions it knows about on the system, rather than the one included with the project, but I don't know.

    This wasn't a problem in 4.0.0 (I think, but am not sure) or in 3.x, to the best of my knowledge.

    Any ideas on what's going wrong? Is it a bug I need to report?

  • Lifetime Qt Champion


    AFAIK, cmake's handling has changed with Qt Creator 4.0.0 so it might be due to that. In any case, why not make a kit with the Qt version you have for your projecT ?

Log in to reply