Results 1 to 3 of 3

Thread: pass code from .pro file through to Makefile in qmake?

  1. #1
    Join Date
    Oct 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question pass code from .pro file through to Makefile in qmake?

    New to Qt programming so not sure if I'm missing something obvious....

    Is there a way to have qmake pass code through from a .pro file to the generated Makefile?

    We have a rather complicated development environment and I would like to have a couple of
    "include /path_to/my_make_include_file"
    statements in the generated Makefile, without having to edit the file by hand after running qmake.

    Thanks!

  2. #2
    Join Date
    Sep 2008
    Posts
    13
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: pass code from .pro file through to Makefile in qmake?

    Quote Originally Posted by rholsen View Post
    Is there a way to have qmake pass code through from a .pro file to the generated Makefile?

    We have a rather complicated development environment and I would like to have a couple of
    "include /path_to/my_make_include_file"
    statements in the generated Makefile, without having to edit the file by hand after running qmake.
    Yes, in the qmake Manual under the project files section, it tells you how to declare other libraries and include paths:



    Excerpt from manual:
    If you are using other libraries in your project in addition to those supplied with Qt, you need to specify them in your project file.

    The paths that qmake searches for libraries and the specific libraries to link against can be added to the list of values in the LIBS variable. The paths to the libraries themselves can be given, or the familiar Unix-style notation for specifying libraries and paths can be used if preferred.

    For example, the following lines show how a library can be specified:

    LIBS += -L/usr/local/lib -lmath

    The paths containing header files can also be specified in a similar way using the INCLUDEPATH variable.

    For example, it is possible to add several paths to be searched for header files:

    INCLUDEPATH = c:/msdev/include d:/stl/include

  3. #3
    Join Date
    Oct 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: pass code from .pro file through to Makefile in qmake?

    Quote Originally Posted by bbui210 View Post
    Yes, in the qmake Manual under the project files section, it tells you how to declare other libraries and include paths:



    Excerpt from manual:
    I did notice that in the manual and am using it to expand my INCLUDE and LIB paths and specify C code includes, etc. Works great. But what I would like to do is have an actual "include" statement in the generated Makefile. I am using clearcase and clearmake which allows one to include additional makefile code from external files by saying "include filename.inc". I would like to pass that "include" directive through from the .pro file without any intermediate modification by qmake. In other words, I want to include makefile directives, variables, etc. that qmake just passes through.

    It's beginning to look like I must code make rules to mimic what qmake does with moc, etc., and just use our regular make.

    Just wanted to know if there was an easier way, because qmake does some neat things.

Similar Threads

  1. Replies: 2
    Last Post: 8th November 2007, 20:15
  2. need script to change qmake .pro file
    By rajeshs in forum Qt Programming
    Replies: 5
    Last Post: 7th July 2007, 17:53
  3. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  4. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  5. Replies: 1
    Last Post: 11th January 2006, 14:15

Tags for this Thread

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.