Home · Overviews · Reference · Classes codeless banner

depends Extension

The depends extension provides two interfaces for inter-project dependencies.

Projects can influence their dependants by creating depends objects.


You can use the following TYPE modifiers to affect how depends objects work.

Projects register their dependencies with the DEPENDS variable or with the MODULES variable.


The advantage of MODULES is that you do not need to know the exact location of the other project and you can use the project even if it does not exist (which is the case when you depend on a project in an SDK). If you depend on a module and it does not exist the project tree will be searched and if the module is found your project will do an immediate DEPENDS-style load of the other project. This allows greater parallelization when building. Note that extra dependencies will be inserted in this case to ensure things aren't built out of order.

Note that some variables set by another project will be automatically imported into your project due to the DEPENDS.AUTO_PERSIST variable. This is currently used by the qt and qtopia extensions to let QT and QTOPIA values get inherited.

The .EVAL object is considered to be a list of statements that are evaluated by dependant projects.

        "FOO=foo bar" "BAR=""foo bar"""\

This equates to the following code:

    FOO=foo bar
    BAR="foo bar"

Note how the quotes were handled. Individual strings are interpreted as lines. Embedded quotes become quotes. This makes the first test true and the second test false.


See also QBuild Extensions and QBuild Script.

Copyright © 2009 Nokia
Qt Extended - QBuild Maintainer Guide