A quote from the official documentation:
"Specify rules to run at install time."
What exactly is install time?
The problem for me: I am on Linux, software is installed from packages that are just dependencies and data. There is no CMake that can do anything here. So installation time of software is out of scope from CMake. So what exactly do they mean?
I'd like to expand the answer, which ComicSansMS gave you, a little bit.
As he mentioned - CMake generates an extra target called
install
for themake
tool (when you use a Makefile-based generator).It may look weird for you as a package system is used for Linux. However the
install
target is still useful or even necessary:/usr
directory; you may use your/home
.Building a CMake project can roughly be divided into three phases:
cmake
itself.make
).INSTALL
target generated by CMake (like, when runningmake install
).Note that the last phase is optional. If you do not want to support calling
make install
but prefer another deployment mechanism, you simply don't use theinstall
command in your CMake script and noINSTALL
target will be generated.