[Development] adding a custom entry to qmake's QT (or CONFIG?) commands

Oswald Buddenhagen oswald.buddenhagen at theqtcompany.com
Tue Oct 13 12:45:06 CEST 2015


On Tue, Oct 13, 2015 at 10:20:03AM +0200, René J.V. Bertin wrote:
> I'm experimenting with something that requires me to add an optional
> simple linker module (static library or even a .o object file) in the
> final step of the build process of an application (or library). It'd
> be part of QtBase (QtCore, even), and provide a means to control the
> behaviour of one of the QtCore classes.
> 
mkspecs/features/qtcore_insanity.prf:

qtcore_be_insane: DEFINES += QTCORE_BE_INSANE
SOURCES += $$PWD/data/qtcore_insanity.cpp

src/corelib/corelib.pro:

...
MODULE_CONFIG += qtcore_insanity
...


user_project.pro:

...
CONFIG += qtcore_be_insane
...

did i already mention that this is kinda insane?

all other build systems would have to be adjusted to grok that as well.
i suppose you could use weak symbols to make linking that object
optional, at least. not sure that can be done cross-platform, though.

we (mostly thiago and me) discussed exactly this thing quite a while ago
on gerrit (or jira?) with somebody - wasn't that you?



More information about the Development mailing list