PDA

View Full Version : Installing/collecting library header files with qmake



orb9
3rd May 2006, 19:27
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...:confused:

jacek
3rd May 2006, 20:53
You could try something like:
header_files.files = $$HEADERS
header_files.path = <path>
INSTALLS += header_files

http://doc.trolltech.com/3.3/qmake-manual-8.html#Environment

orb9
4th May 2006, 21:06
Works like a charm :D Thank you very much.

SPQRUSA
7th April 2010, 21:58
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

wysota
7th April 2010, 23:09
Try:
HEADERS+=commondir/*.h
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.