[CMake] Questions about generated install target

Jon Trauntvein j.trauntvein at comcast.net
Tue Feb 7 18:17:36 EST 2006


I am starting to experiment with the INSTALL_XXX commands so that I can 
do a reasonable source distribution for my software.  Part of what my 
software needs is to have the binaries placed in a given directory 
(/opt/package).  I also need to write one or more files to /etc/opt.  
The documentation states that both INSTALL_PROGRAMS and INSTALL_FILES 
will prefix the value of CMAKE_INSTALL_PREFIX to the argument I 
provide.  This means that, in order to get the results that I want, I am 
forced to set CMAKE_INSTALL_PREFIX to "/".  This seems to be much more 
difficult than it should be and gives me the feeling that I am violating 
some sort of cmake expectation.  Any enlightenment would be welcome.

I would also like to be able to insert custom commands into the install 
target that would allow me to do things like creating a directory in 
/var/opt/package but not copying any files.  I'm not sure how to 
approach this.

Thanks,

Jon Trauntvein


More information about the CMake mailing list