Royi Freifeld
Royi Freifeld

Reputation: 659

Specify debug/release build in qt

I would like Qt Creator to build the project according to the type I specify in the little computer button.

Using:

CONFIG(debug, debug|release)
{
    DESTDIR = Debug
    OBJECTS_DIR = Debug/.obj
    MOC_DIR = Debug/.moc
    RCC_DIR = Debug/.rcc
    UI_DIR = Debug/.ui
}

CONFIG(release, debug|release)
{
    DESTDIR = Release
    OBJECTS_DIR = Release/.obj
    MOC_DIR = Release/.moc
    RCC_DIR = Release/.rcc
    UI_DIR = Release/.ui
}

Or, using the answer from here, makes qmake chose the last time a variable was defined.

How do I set it?

Thnx

P.S I don't know if it has something to do with my problem, but I'm using Ubuntu and not Windows

Upvotes: 1

Views: 410

Answers (1)

alexisdm
alexisdm

Reputation: 29896

The opening brace should be on the same line as the condition, as indicated here.

Upvotes: 3

Related Questions