[Qt-creator] Generating .pro file from a Makefile?

Diego Iastrubni diegoiast at gmail.com
Thu Mar 15 19:03:42 CET 2012


On Thu, Mar 15, 2012 at 6:24 PM, <andre.poenitz at nokia.com> wrote:
>
> >  Is there an easy way to do that?  All I know of right now is to just
> create a
> >  new project, and manually add all the .h & .c files by hand (or doing a
> > qmake -project).  But in some ways, I’m not sure I even want to create a
> .
> >  pro file that  is capable of creating a Makefile, since I don’t really
> want to
> >  overwrite an existing, perfectly working Makefile…
> > Sean
>
> In such cases I usually use a 'qmake -project' generated .pro for editing
> and
> exploration and the original build files for building. If you have a
> working
> Makefile, just removing the 'qmake' builds step from the build settings
> should be sufficient.
>
> Sometimes it is necessary to polish it a bit by adding a few DEFINES +=in
> the
> .pro ir similar, but the approach is typically "good enough".
>
>
And since I see Adam's response: I wouldn't recommend the "Generic Project"
> over the "Dummy .pro file", as the format of the Generic Project is fairly
> simplistic,
> you can't tinker much there. In a .pro you can use conditionals, check
> environment
> variables etc, i.e. cover the ground between "Just a file list" and "A
> fully working .pro file".
>
>
That is what I used in my previous job: I made a PRO file which conatained
the files needed, and fixed the includes so QtCreator would be able to load
the classes. But then I found that the build system is not really working
and I needed to go to the shell and compile manually.

Eventually I broke down and the Makefile project and I was happy. I even
fixed the "deploy" target to install the project on the NFS used. Then I
hacked a shell script to SSH to the "remote" device running from my NFS and
I was able to run the application by pressing "Control+R" on QtCreator.

Use the same build system on QtCreator - you get the compilation errors on
the panels, which is priceless.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20120315/a12abfc8/attachment.html>


More information about the Qt-creator mailing list