Results 1 to 3 of 3

Thread: path to Makefile in *.pro file

  1. #1
    Join Date
    Dec 2011
    Location
    Landau, Palatinate, Germany
    Posts
    7
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default path to Makefile in *.pro file

    Hi,

    is it possible to tell Qt in the *.pro file that the Makefile should be in another directoy in a way that the QtCreator can build the project?

    At moment I have the following setting in my pro-file:
    Qt Code:
    1. QMAKE_MAKEFILE = $${PRJ_BUILD}Makefile
    2. message(QMAKE_MAKEFILE=$$QMAKE_MAKEFILE)
    To copy to clipboard, switch view to plain text mode 
    PRJ_BUILD is the path where the Makefile should be.

    QMake already runs in QtCreator without any problem, but if I want to build then, make tells me, that it can not find the Makefile.
    I think this is related to the variable OUT_PWD, but changing the variable will not work. Is this a readonly variable?
    Can I change the QtProjectSettings of QtCreator for make in a pro-file?

    Did I overseen anything?

    The background is, that I use "Pro C" and the generated C-File, should not be in my sources, so I have to locate the Makefile in a different directory called "build"!

    I have already seen the old thread of 2009, but there is no solution for me...

    Thanks
    Andreas

  2. #2
    Join Date
    Dec 2011
    Location
    Landau, Palatinate, Germany
    Posts
    7
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: path to Makefile in *.pro file

    Hi,

    I solved my problem in an other way.
    Now I don't relocate the Makefile, but I give a path where the generated C-File has to be...
    But a small beauty fault is, that the Makefile is already in my sources...
    but I think I can live with that.

    Andreas

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: path to Makefile in *.pro file

    Why not just shadow build the entire project? There's an option in the Qt Creator project settings to do this. It is the equivalent of:
    Qt Code:
    1. $ pwd
    2. /home/chrisw/myproject
    3. $ mkdir ../myproject_build
    4. $ cd ../myproject_build
    5. $ qmake ../myproject
    6. $ make
    To copy to clipboard, switch view to plain text mode 
    The soure tree is left entirely alone. All intermediate files go into myproject_build in a tree that mirrors the source.

Similar Threads

  1. Qt Creator: File Makefile doesn't exist
    By earthling in forum Qt Tools
    Replies: 6
    Last Post: 4th November 2016, 03:44
  2. qmake and nmake (wrong path to Qt in makefile)
    By StarShaper in forum Installation and Deployment
    Replies: 0
    Last Post: 9th March 2012, 05:23
  3. How to name makefile in .pro file?
    By DigiDrag in forum Newbie
    Replies: 17
    Last Post: 9th September 2009, 08:28
  4. pass code from .pro file through to Makefile in qmake?
    By rholsen in forum Qt Programming
    Replies: 2
    Last Post: 16th October 2008, 18:51
  5. Makefile moc path corrupted in WindowsXP Qt 4.4.2
    By khopper in forum Qt Programming
    Replies: 4
    Last Post: 27th September 2008, 22:49

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.