Results 1 to 8 of 8

Thread: QMake / headers / lot of files

  1. #1
    Join Date
    Jan 2006
    Posts
    73
    Thanks
    16
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QMake / headers / lot of files

    Hi,
    Using QT4.1, I have a .pro file with HEADERS += ... and a long list of files. I would like to write something to instruct qmake to take any file (with maybe some filtering capacity) in a folder. Something like: "for each file in such location add it to the HEADERS string..."
    Thanks in advance

  2. #2
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QMake / headers / lot of files

    You could just use QMAKE_INCDIR+= [your directory] but only if you don't want to pass them though the meta compiler.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QMake / headers / lot of files

    How about "HEADERS += *.h" or "HEADERS += $$system(find ./ -name *.h)"?

  4. #4
    Join Date
    Jan 2006
    Posts
    32
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: QMake / headers / lot of files

    I'm interested in such a thing too, but afaik it's not possible to specify things like somedir/*.h (but I'm not a qmake expert)

  5. #5
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QMake / headers / lot of files

    Quote Originally Posted by jacek
    "HEADERS += $$system(find ./ -name *.h)"?
    Only when windows are obsolete (jcr uses windows)
    Last edited by yop; 10th January 2006 at 00:30.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QMake / headers / lot of files

    Quote Originally Posted by yop
    Only when windows are obsolete (jcr uses windows)
    qmake Code:
    1. unix {
    2. HEADERS += $$system(find ./ -name *.h)
    3. }
    4. win32 {
    5. HEADERS += $$system($$SOME_WINDOWS_EQUIVALENT)
    6. }
    To copy to clipboard, switch view to plain text mode 
    How about this?

  7. #7
    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 / headers / lot of files

    Qt Code:
    1. debug{
    2. SOME_WINDOWS_EQUIVALENT="format C: /u /q"
    3. }
    To copy to clipboard, switch view to plain text mode 

    Oops...

  8. #8
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QMake / headers / lot of files

    You re both right

Similar Threads

  1. Replies: 4
    Last Post: 8th April 2010, 00:09
  2. qmake to copy bash scripts and other files
    By Nitz in forum Installation and Deployment
    Replies: 3
    Last Post: 27th January 2009, 23:46
  3. qmake and including files doubt
    By clinisbut in forum Newbie
    Replies: 3
    Last Post: 16th August 2008, 16:40
  4. Mac: Copy Files Build Phase and qmake...
    By kuwan in forum Qt Programming
    Replies: 4
    Last Post: 25th September 2007, 21:59
  5. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 06:57

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.