Results 1 to 5 of 5

Thread: Installing/collecting library header files with qmake

  1. #1
    Join Date
    Jan 2006
    Posts
    22
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Installing/collecting library header files with qmake

    Does anybody now how to tell qmake to collect all the header files and put them into a specified directory?
    I'm developing a library and i did not find how to tell qmake to install the headers...

  2. #2
    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: Installing/collecting library header files with qmake

    You could try something like:
    Qt Code:
    1. header_files.files = $$HEADERS
    2. header_files.path = <path>
    3. INSTALLS += header_files
    To copy to clipboard, switch view to plain text mode 

    http://doc.trolltech.com/3.3/qmake-m...ml#Environment

  3. The following 2 users say thank you to jacek for this useful post:

    alizadeh91 (9th December 2012), orb9 (4th May 2006)

  4. #3
    Join Date
    Jan 2006
    Posts
    22
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Re: Installing/collecting library header files with qmake

    Works like a charm Thank you very much.

  5. #4
    Join Date
    Jan 2010
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Installing/collecting library header files with qmake

    This only works for me if you do a "make install" - how do I get the headers copied into a common directory as part of the compile process? I tried QMAKE_PRE/POST_LINK = make install but that doesn't work either.

    Thanks.

    SPQR

  6. #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: Installing/collecting library header files with qmake

    Try:
    qmake Code:
    1. HEADERS+=commondir/*.h
    To copy to clipboard, switch view to plain text mode 
    Just be aware you will have to call qmake every time you add a new file to that directory.

    An alternative is to use Jacek's solution but instead of INSTALLS make use of QMAKE_EXTRA_TARGETS.

Similar Threads

  1. qmake sux a lot
    By singermornings in forum Qt Programming
    Replies: 6
    Last Post: 29th January 2009, 09:33
  2. Adding library dependencies to qmake
    By sadastronaut in forum Installation and Deployment
    Replies: 2
    Last Post: 18th March 2008, 18:06
  3. Mac: Copy Files Build Phase and qmake...
    By kuwan in forum Qt Programming
    Replies: 4
    Last Post: 25th September 2007, 21:59
  4. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 06:57
  5. qt3 themes example: missing header files?
    By nikita in forum Qt Programming
    Replies: 3
    Last Post: 9th August 2006, 13:12

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.