Or else, $qmake CONFIG+=TEST in pro file TEST { #do some stuff } else { #do something } Note that, in this case, you won't be able to check for the TEST definition inside .h and .cpp files. -- André Fillipe