[Qt-interest] problem with scopes in qmake makefiles

Elric ru.elric at gmail.com
Mon Feb 8 20:26:04 CET 2010


I have the following code in makefile:

win32 {
  CONFIG(debug) {
    DESTDIR         = bin/debug
    OBJECTS_DIR     = bin/debug
    CONFIG         += console
  } else {
    DESTDIR         = bin/release
    OBJECTS_DIR     = bin/release
    CONFIG         -= console
    QMAKE_POST_LINK = upx -9 -q $$DESTDIR/$$join(TARGET, "", "", ".exe")
  }
}

The problem is that when I build it in release mode, it is built as a
console application and the resulting executable doesn't get
compressed with upx. It just looks like a debug rule has been applied.
However, the executable is built in bin/release folder, which means
that qmake took DESTDIR and OBJECTS_DIR from release rule, and CONSOLE
from debug one.

I'm using the following commands to compile it:

qmake
nmake release

and

qmake
nmake debug

Am I missing something?

-- 
Best regards,
  Elric, ru.elric at gmail.com.



More information about the Qt-interest-old mailing list