[Qt-interest] What are the rules for capitalization of "config" in .pro files?

K. Frank kfrank29.c at gmail.com
Sat Feb 5 01:00:20 CET 2011


Hello All!

I have a .pro file set up to build both the debug and release versions
of an application, linked with the debug and release versions of a
library, respectively.

It seems that sometimes the "config" variable may be specified in
lowercase, but that other times it must be given in uppercase.
(I _think_ that always using uppercase works, but I might have had
a test case where this wasn't true.)


This works.


config += debug_and_release
CONFIG += build_all

CONFIG(debug, debug|release) {
  LIBS += -lmylib_debug
}
CONFIG(release, debug|release) {
  LIBS +=  -lmylib_release
}


But changing "CONFIG += build_all" to "config += build_all"
fails (in that running make with no arguments only builds
the debug version, rather than both the debug and release
versions).

Hardly a big deal, but does anyone know what's going on here?

As a practical matter should I always stick to uppercase "CONFIG",
or might that bite me in the future in other ways?


Thanks for any and all enlightenment.


K. Frank



More information about the Qt-interest-old mailing list