[Qt-qml] Tool to pack / minify content of QML files ?
Adriano Rezende
adriano.rezende at openbossa.org
Mon Jan 10 14:27:55 CET 2011
On Sat, Jan 8, 2011 at 4:51 AM, Gregory Schlomoff
<gregory.schlomoff at gmail.com> wrote:
>> You can use PRE_TARGETDEPS var in your .pro file to pre-process the
>> qml files before the resource is generated.
>
> I was looking for something like that, but haven't found how I can use
> PRE_TARGETDEPS. The doc says only: "All libraries that the target
> depends on can be listed in this variable." But QML files aren't
> libraries, are they?
>
> Would you have a small example to show how I can use this variable in
> a .pro file to pre-process .qml files with an external tool?
Yes, this is something undocumented in qmake docs.
You can do like below:
minifyextra.target = minify
minifyextra.commands = "ls" # replace to your minify script
QMAKE_EXTRA_TARGETS += minifyextra
PRE_TARGETDEPS = minify
Br,
Adriano
More information about the Qt-qml
mailing list