Qt Extended Home · Build System Home · Reference · User Guide · Internals |
The Qt Extended build system has dependency information embedded into the qbuild.pro files. This makes it possible to build everything in the most efficient way as well as giving us flexibility. For example, a library can be renamed with a single change in a single file. Without the dependency system, many files would need to be changed. The dependency information also gives us the ability to graph interdependencies between projects as well as dependencies on external libraries.
Do not put LIBS+= or INCLUDEPATH+= lines in your qbuild.pro files. Use MODULES instead.
This applies even if you need to depend on something that isn't built (ie. part of the system). Simply create a stub project for it with .EVAL commands. This keeps our dependencies clearly defined.
If your app can handle a missing dependency you should do something like this:
contains(PROJECTS,mydep):CONFIG+=enable_mydep enable_mydep:depends(mydep) else:DEFINES+=QTOPIA_NO_MYDEP
Use the presence or absence of enable_mydep in the qbuild.pro file (eg. disable whole files that use the depdendency). Use the presence or absence of QTOPIA_NO_MYDEP to handle code that interfaces with the dependency.
See also Overviews, PROJECTS, CONFIG, and DEFINES.
Copyright © 2009 Nokia | Qt Extended - Build System Documentation |