[Qt-interest] qmake and customizing the target name of the library when using template "lib"
Ulrich Tuerk
ulit at no-spam.com
Fri Feb 6 10:49:20 CET 2009
Hi Oliver,
thanks for the input.
snip
>
> Another workaround would be that you create a "custom target" which would e.g. copy all necessary files for distribution to a given place. And while doing so renaming your plugins as well. So when you enter:
>
> %> make mydist
>
> or something you'd execute a "cp project/plugins/MyPlugin/bin/libMyPlugin.so dist/wherever/bin/plugins/MyPlugin.so" etc.
>
snip
I was also thinking about this already.
Since I already have a self-written master Makefile, I currently do
something with brutal force:
The .pro file contains:
...
CONFIG += no_autoqmake
TARGET = temporaryModuleNameWhichWillBeReplaced
...
My master Makefile has a static rule to build Qt Makefile from the .pro
files:
MakefileQM% : %.pro
qmake $<
sed -i -e "s/libtemporaryModuleNameWhichWillBeReplaced.so/mod_$*.lo/g" $@
Thus, I disable the ability of the Qt Makefile to regenerate itself and
do the job on my own in the master Makefile. By editing the resulting Qt
Makefile with sed I end up with the target library name
"mod_MyPlugin.lo" when the name of the project file is MyPlugin.pro. ($*
represents the stem of the static Makefile rule).
Uli
--
For replying:
Replace the domain "no-spam.com" by "sce-gmbh.de". Thanks.
More information about the Qt-interest-old
mailing list