[Qt-interest] How make Qt projects / Makefiles with no hard-coded paths?
Tiago Correia
tiago at cnotinfor.pt
Tue Mar 30 01:42:16 CEST 2010
Yes,
I agree. In our company we also use this approach. Just save the source and
the pro file, which is also part of the source. Then you just need to have
Qt installed and run:
1. qmake
2. make
And you are done. You can use this also for multiplatform development, and
to allow each developer to use it's own tools for compiling.
--
Tiago Correia
chief technology officer
[image: cnoti logo] +351 239 499 231
www.cnotinfor.pt
www.imagina.pt
www.usbprotection.net
[image: facebook]
<http://www.facebook.com/profile.php?id=10000007742435> [image:
twitter] <http://twitter.com/cnotinfor> [image:
youtube]<http://www.youtube.com/cnotinfor> [image:
blog] <http://bica.cnotinfor.pt/>
On Mon, Mar 29, 2010 at 21:50, J-P Nurmi <jpnurmi at gmail.com> wrote:
> On Mon, Mar 29, 2010 at 11:37 PM, Ed Sutton <ESutton at fescorp.com> wrote:
> > What are some best practices for building Qt projects that leave no
> hard-coded paths in the Makefile or Qt project files?
> >
> > My goals are:
> >
> >
> > 1. Retrieve project source from Subversion on any machine configured
> for development or building releases.
> > 2. Build a release by running make in the project source using an
> un-modified version of the Makefile retrieved from Subversion ( no
> hard-coded paths in Makefile )
> > 3. Be able to open and build an un-modified Qt project file retrieved
> from Subversion ( no hard-coded paths in the Qt project file )
> >
> > I have not used QTDIR, PATH or QMAKESPEC environment variables before.
> Is this the best way?
> >
> > I do not mind requiring Qt to be installed to a specific path such as
> /opt/qtsdk-2010.02 or configured in a consistent manner.
> >
>
> What's wrong with fully cross-platform and tool chain independent .pro
> files that are much more human-readable than makefiles anyway?
>
> Just forget about storing makefiles to version control system, but
> store the qmake project file and let people choose their preferred way
> to build the project. Let it be for example MSVC on Windows or Xcode
> on Mac, your makefiles might not be that usable. qmake on the other
> hand can generate VS/Xcode project files for those who want them.
>
> --
> J-P Nurmi
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100330/6e9dc1c3/attachment.html
More information about the Qt-interest-old
mailing list