[CMake] Overwiew CMake install commands
Joachim Ziegler
ziegler at mpi-sb.mpg.de
Mon Sep 24 11:35:21 EDT 2007
Hello list,
I just don't get the difference between and when to use the different
INSTALL commands (or their subcategory in the new INSTALL command,
resp.) as described on
http://www.cmake.org/Wiki/CMake:Install_Commands
When would I use
- INSTALL_FILES
- INSTALL_PROGRAMS
- INSTALL_TARGETS
and what for?
For example, when I give the following rules
ADD_EXECUTABLE(myapp ${SOURCEFILES})
INSTALL(FILES ${SOURCEFILES} DESTINATION src)
INSTALL(TARGETS myapp RUNTIME DESTINATION bin)
and the use
$ make package_source
the rule specifying the directory to where the source files go seems to
be overriden: they go into the top directory. In contrast, in the binary
package, they go into the src directory.
So, frankly speaking, I just do not understand the effects of these
commands. (What is the difference between a TARGET and a PROGRAM and
what is installed/packaged in the respective case?)
Thank you,
Joachim
More information about the CMake
mailing list