Adding install section to the generated Makefile
-
after running qmake i get the Makefile with empty install section
how can i make qmake generate the install commands in the Makefile automaticly ? -
Well you can use the pro file to do install stuff. Like for one of my libraries I do:
@
INSTALLS += library headers docslibrary.files = libsharkcore.a
library.path = /usr/local/lib
headers.path = /usr/local/include/sharkcore
headers.files = src/.h
docs.files = docs/docs/html/
doc.spath = /usr/local/share/doc/sharkcore
@You can check out qmake's docs for info on installing things. If you need more advanced stuff I would look into cmake. It is very compatible with Qt and can do very very advanced install stuff. It support makefiles and a lot of other generators like ninja. As a warning though, cmake can be very confusing/complicated for a first timer. :)