[Qt-interest] How make Qt projects / Makefiles with no hard-coded paths?

Ed Sutton ESutton at fescorp.com
Tue Mar 30 14:39:00 CEST 2010


Hi J-P,

Thank you for your reply.


> 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.


I did not think about that.  Dumb question I suppose - how do you build a project from the command line using the .pro file?


-Ed


> 
> --
> J-P Nurmi
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest


-Ed





More information about the Qt-interest-old mailing list