Results 1 to 4 of 4

Thread: Include a file using variables into the Makefile created by qmake

  1. #1
    Join Date
    Nov 2007
    Posts
    36
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Include a file using variables into the Makefile created by qmake

    Hello,

    I need some help with qmake and the Makefile generated by Qt. I was searching in Qt Assistant but I didn't find anything to solve my problem.

    I'd like to include a file using variables into the Makefile created by "qmake" command. Something like that:

    .pro example

    Qt Code:
    1. TEMPLATE = lib
    2. TARGET =
    3. DEPENDPATH += .
    4. LIBS += …
    5.  
    6. [B]include ( var.include )[/B]
    7.  
    8. INCLUDEPATH += .
    To copy to clipboard, switch view to plain text mode 

    Is that possible?

    By the way, is there something to include my own variable into the Makefile? Example:

    .pro example

    Qt Code:
    1. TEMPLATE = lib
    2. TARGET =
    3. DEPENDPATH += .
    4. LIBS += …
    5.  
    6. [B]MYOWNVARIABLE = $(ROOT)[/B]
    7.  
    8. INCLUDEPATH += .
    To copy to clipboard, switch view to plain text mode 

    Thank you very much.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Include a file using variables into the Makefile created by qmake

    Quote Originally Posted by tarod View Post
    I'd like to include a file using variables into the Makefile created by "qmake" command.
    include(file.pri) should work fine.

    By the way, is there something to include my own variable into the Makefile?
    What does "my own variable" mean? Read qmake docs and the [WIKI]Undocumented qmake[/WIKI] article in our wiki.

  3. #3
    Join Date
    Nov 2007
    Posts
    36
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Include a file using variables into the Makefile created by qmake

    Hello again,

    I was trying to include a file using include(file.pri) but the file is processed when my idea is only read the variables that contains that file. Any solution?

    What does "my own variable" mean? Read qmake docs and the Undocumented qmake article in our wiki.
    I'd like to include variables like MYINCLUDE = hello.h, MYCOMPILER = g++ and so into the .pro provided by qmake. These variables sould appear in the Makefile.

    Is that possible?

    Thank you very much.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Include a file using variables into the Makefile created by qmake

    If you make a variable assignment in a .pro file, it is copied to the resulting Makefile.

Similar Threads

  1. QApplication: no such file or directory
    By jochen_r in forum Newbie
    Replies: 13
    Last Post: 15th November 2008, 22:46
  2. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 06:57
  3. Replies: 1
    Last Post: 11th January 2006, 15:15

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.