+ Reply to Thread
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
    35
    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
    31,440
    Thanks
    3
    Thanked 4,718 Times in 4,519 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Blog Entries
    4
    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 Undocumented qmake article in our wiki.

  3. #3
    Join Date
    Nov 2007
    Posts
    35
    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
    31,440
    Thanks
    3
    Thanked 4,718 Times in 4,519 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Blog Entries
    4
    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.

+ Reply to Thread

Similar Threads

  1. QApplication: no such file or directory
    By jochen_r in forum Newbie
    Replies: 13
    Last Post: 15th November 2008, 21:46
  2. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  3. Replies: 1
    Last Post: 11th January 2006, 14: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