Important: Please read the Qt Code of Conduct -

QMAKE: how to write more complex project?

  • Is there any good tutorial how to write a QMAKE for more complex projects? Because it drives me angry...I want structure like has QtCreator repository...

  • Have you read QMake tutorial?


  • Moderators

    Just take a look into the Qt Creator repository for inspiration if that does something similar to what you want...

    Qmake is sadly underdocumented:-( Looking at examples is the best way to learn it in my opinion.

  • Yeah I agree with Tobias. It took me ages to figure out how to get qmake to do shadow builds (from within the .pro files) for both debug and release properly. The key to it was using the build_pass{} scope - qmake actually parses the .pro files up to 3 times!

    Do you have any specific project layout examples that you want to achieve? You mention like qt-creator but which aspect of it?

  • Yes, I have downloaded repo of sources, but this QMAKE (.pro/.pri) files are including so weird...

    I want to have sources at one place, resources at one place and builds at one place
    |- src/
    |- app/
    |- libs/
    |- // and so on...
    |- bin/
    |- debug/
    |- release/
    |- res/
    |- // any resources...
    |- doc/
    As it has QtCreator (or similar)...

    At Tobias: Does anybody work on this documentation? Does anybody upgrade that documentation? Or it's just flow from version to version?

  • Moderators

    I am not aware of anybody working on qmake documentation.

    As I said before:That organization of files you have to follow for your school does not really make sense for qmake without an installation step. Qmake assumes -- as any sensible build system would -- that it can put build artifacts wherever it wants to. If you need your files in specific places, then you need to install them.

  • Okay. But QtCreator uses that oraganization not only me. And I will be using shadow builds for this project...

  • So, I think, It takes me a weeks to prepare it :D

Log in to reply