Results 1 to 2 of 2

Thread: qmake: how to supply multiple variables via command-line?

  1. #1
    Join Date
    Oct 2009
    Posts
    36
    Thanks
    5
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default qmake: how to supply multiple variables via command-line?

    Hello.

    qmake allows to supply a variables via a command-line interface like this:
    Qt Code:
    1. qmake "CONFIG += release" "MY_VAR = hello"
    To copy to clipboard, switch view to plain text mode 

    So i can use $$MY_VAR inside a .pro file. But is it possible to suply more than one variable such way? I have tried
    Qt Code:
    1. qmake "CONFIG += release" "MY_VAR = hello" "MY_ANOTHER_VAR = hi"
    To copy to clipboard, switch view to plain text mode 

    But it did not work (raises error). Any hints?

  2. #2
    Join Date
    Oct 2011
    Location
    Australia
    Posts
    29
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: qmake: how to supply multiple variables via command-line?

    Works for me - QMake version 2.01a. There should be no issue with that:

    Qt Code:
    1. $ cat pro.pro:
    2. message($$MY_VAR | $$MY_ANOTHER_VAR)
    3. $ qmake pro.pro "CONFIG += release" "MY_VAR = hello" "MY_ANOTHER_VAR = hi"
    4. Project MESSAGE: hello | hi
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Replies: 2
    Last Post: 28th June 2009, 13:39
  2. Replies: 2
    Last Post: 25th June 2009, 20:47
  3. Replies: 2
    Last Post: 7th July 2008, 09:44
  4. Order of qmake variables
    By babu198649 in forum Newbie
    Replies: 3
    Last Post: 29th June 2008, 10:02
  5. Replies: 3
    Last Post: 6th February 2008, 13:53

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.