Results 1 to 5 of 5

Thread: qmake question

  1. #1
    Join Date
    Dec 2006
    Posts
    426
    Thanks
    8
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default qmake question

    Hi,

    I have a common config.h file located in a shared directory, which is shared by many pro files under different directories. Is there a command I can use in the config.h file to determine the full path of the pro file when executaing qmake on any of the pro files?

    Currently, I have to add the following same line in every pro file, which I don't like.
    dir = $$system( pwd )

  2. #2
    Join Date
    Jan 2006
    Posts
    128
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake question

    Didn't you ask the same question already?

    What did not work with the approaches posted in this thread:
    http://www.qtcentre.org/forum/f-qt-p...ke-5071.html#6

  3. #3
    Join Date
    Dec 2006
    Posts
    426
    Thanks
    8
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: qmake question

    Quote Originally Posted by camel View Post
    Didn't you ask the same question already?

    What did not work with the approaches posted in this thread:
    http://www.qtcentre.org/forum/f-qt-p...ke-5071.html#6
    You bet!!! Sorry I didn't know you already answered it the next day I posted the question! And it is exactly the answer I was looking for!!!

    Excellent!! Thanks!

  4. #4
    Join Date
    Dec 2006
    Posts
    426
    Thanks
    8
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: qmake question

    On the other hand, I feel bad, because I already put

    CURRENT_DIR = $$system( pwd )

    in all the final pro files, and now I have to yak it!!

  5. #5
    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: qmake question

    Use sed

    find . -name "*.pro" - exec sed -e "s/CURRENT_DIR = $$system( pwd )/$$OUT_PWD/g" "{}" > \{\}.new; mv \{\}.new "{}" \;

Similar Threads

  1. Flex, Bison and qmake
    By Hydragyrum in forum Qt Programming
    Replies: 5
    Last Post: 2nd May 2011, 15:52
  2. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  3. qmake to build both 32-bit and 64-bit
    By lni in forum Qt Programming
    Replies: 8
    Last Post: 12th December 2006, 19:35
  4. Replies: 5
    Last Post: 13th March 2006, 20:22
  5. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

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.