Results 1 to 3 of 3

Thread: pass qmake arguments to sudir project

  1. #1
    Join Date
    Mar 2011
    Posts
    120
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default pass qmake arguments to sudir project

    Hi,

    I have a subdir project. I want to pass a prefix path from qmake argument list to all subdir projects.

    can any one tell me how to do this ?

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: pass qmake arguments to sudir project

    Isn't that done automatically?

    What is the value you get for $$(PREFIX) in the project files inside the subdirs?

    Cheers,
    _

  3. #3
    Join Date
    Mar 2011
    Posts
    120
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Smile Re: pass qmake arguments to sudir project

    Thanks for reply,

    It is working.

    What I was tying :

    parent .pro
    Qt Code:
    1. isEmpty(PREFIX) {
    2. PREFIX = default-path-to-dest
    3. }
    4.  
    5. message($$PREFIX) // it will print default-path-to-dest
    To copy to clipboard, switch view to plain text mode 

    child .pro

    Qt Code:
    1. message($$PREFIX) //it will print empty string
    To copy to clipboard, switch view to plain text mode 

    and under qmake arguments I was passing nothing. I thought parent.pro will check for PREFIX value and if it is empty then it will assign some default value.

    Thanks for your help.

Similar Threads

  1. Replies: 10
    Last Post: 6th April 2011, 11:05
  2. qmake conditionals/arguments
    By tbscope in forum Qt Tools
    Replies: 2
    Last Post: 10th August 2010, 08:21
  3. Replies: 1
    Last Post: 4th December 2009, 00:34
  4. pass code from .pro file through to Makefile in qmake?
    By rholsen in forum Qt Programming
    Replies: 2
    Last Post: 16th October 2008, 19:51
  5. Is it possible to pass arguments to thread?
    By zolookas in forum Newbie
    Replies: 1
    Last Post: 16th July 2008, 19:29

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.