Qtopia Home · Home · Reference · User Guide · Internals

Add a global option

Put this in the optvar section of configure.

    set_optvar( "myopt", +{
        "set" => [ "%", "Enable myopt." ],
        "unset" => [ "no-%", "Disable myopt." ],
        "default" => 1,
        "visible" => $qtopia_visref,
        "autodep" => $qtopia_autoref,
        "config_pri" => "CONFIG+=enable_myopt",
    });

Note the use of a positively-worded option. It is much easier to figure out what code does when the options are positively worded.

If you want defines for testing in code, put this in src/build/qtopia.prf (or common.prf for all projects, not just ones that build against Qtopia).

    # positive define (preferred)
    enable_myopt:DEFINES+=QTOPIA_MYOPT
    # negative define (to match the QT_NO_ style)
    !enable_myopt:DEFINES+=QTOPIA_NO_MYOPT

See also Tasks and Opt System.


Copyright © 2008 Nokia Qtopia Build System Documentation