[PATCH] Don't use "qmake-qt4" as qmake
Thiago Macieira
thiago at macieira.org
Tue May 14 10:33:12 PDT 2013
On terça-feira, 14 de maio de 2013 09.04.51, Linus Torvalds wrote:
> On Tue, May 14, 2013 at 9:01 AM, Thiago Macieira <thiago at macieira.org>
wrote:
> > We need qmake to get QTBINDIR:
> > QTBINDIR = $(shell $(QMAKE) -query QT_INSTALL_BINS)
>
> Oh, I think you're doing that wrong.
I wrote that code, I'm pretty sure I'm doing it right :-)
> I think you should use pkg-config. Something like this:
>
> MOC=$(pkg-config --variable=moc_location QtCore)
> QTBINDIR=$(dirname "$MOC")
>
> (ok, so that's shell syntax, not Makefile syntax, but you get the idea).
>
> No?
I prefer my way. Its equivalent to yours, but with two advantages:
1) it works on Windows, where pkg-config is usually not installed, but
qmake.exe will be. Granted, we're using pkg-config for the -I, -D and -L flags
already, so building on Windows will require some further changes anyway.
2) moc_location is missing from the Qt5Core.pc file, but I could easily fix
that. In fact, I started doing that when I was rewriting Subsurface's Makefile,
but abandoned it in favour of the above solution.
I should probably re-add moc_location so that Qt 5.1 comes with it.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130514/1152f026/attachment-0001.sig>
More information about the subsurface
mailing list