Qt World Summit: Submit your Presentation

Qt Creator: generate Makefile for non-Qt C++ projects?

  • I love using Qt Creator not only for creating Qt projects, but also for non-Qt projects using generic C++ code. It is so much more intuitive for C++ than just about anything I have ever used before.

    When I deploy the code which needs to be compiled on a different machine where Qt is not installed but only g++ is available, I'd like to generate a makefile for that if possible (currently a CGI script for Apache2 running on Linux Debian, very similar to my Ubuntu development environment but probably too risky to consider delivering a pre-built binary). Browsing the qmake manual shows me a few variables such as MAKEFILE and QMAKE_MAKEFILE but also suggests not to change them since qmake handles it internally.

    I could write the Makefile manually, but ... Qt Creator does everything else so well ... anyway, it was just a thought ... or perhaps there is a way? The current project is fairly simple with no shared libraries to worry about, just a dozen or so source files in a src folder and header files in a separate include folder.

  • Well, I just realized that I can run qmake from a terminal and it will generate a Makefile -- it's the default behavior. :)

Log in to reply