How to change my cmake script so that after cmake commands. && make && make install besides compiling a binary, should the configuration file be copied to /etc/myprog.cfg and the binary copied to / usr / bin? If you can't do something like this with cmake, tell me the approach for creating an installer.
2 answers
Try this:
install(TARGETS <target> DESTINATION /usr/bin COMPONENT binaries) install(FILES <config file> DESTINATION /etc COMPONENT config) Of course, instead of the angle brackets you need to substitute the actual values.
|
Depends on the specific distribution. In general, there is the "install" utility , which is used in redhat like distributions to copy RPM files.
- For 'copying files from rpm', the
rpmitself is usually used :) but not as notinstall- NewView
|