Home · Overviews · Reference · Classes codeless banner

conditional_sources Extension

Here's how to do conditional sources.

    FOO.TYPE=CONDITIONAL_SOURCES
    FOO.CONDITION=enable_my_condition
    FOO.HEADERS=foo.h
    FOO.SOURCES=foo.cpp
    !qbuild:CONDITIONAL_SOURCES(FOO)

This mechanism can be used to set the following variables.

Note that the changes to these variables are reflected only after the conditional_sources extension has finalized. If you need to force this to happen before your .pro file has finished parsing you can do so.

    conditional_sources_finalize()

See also QBuild Extensions and QBuild Script.


Copyright © 2009 Nokia
Qt Extended - QBuild Maintainer Guide