[CMake] Example use of CPACK_INSTALL_COMMANDS

Eric Noulard eric.noulard at gmail.com
Thu Jul 18 02:08:09 EDT 2013


2013/7/18 Anil Gunturu <anil.gunturu at skyfab.com>:
> Can someone please share an example using CPACK_INSTALL_COMMAND?
>
> More specifically, I am trying to avoid cpack installing the files using the
> "make install". I prefer to use CPACK_INSTALLED_DIRECTORIES to get a fine
> grain control. Is there a way to override the default files that CPACK
> installs?

The design and purpose of CPack is to install **every** bits specified
by CMake 'install(...)' command found in your CMakeLists.txt.

Some vars like CPACK_INSTALL_COMMANDS or CPACK_INSTALLED_DIRECTORIES
makes it possible to install extra files/directories.

Now if you want to filter out some parts appearing in 'install(...)'
you'd better use COMPONENT with your install commands and select the
COMPONENT to be installed by CPack using CPACK_COMPONENTS_ALL
see
http://www.cmake.org/cmake/help/v2.8.8/cpack.html#variable:CPACK_COMPONENTS_ALL
or
cpack --help-variable CPACK_COMPONENTS_ALL


--
Erk
L'élection n'est pas la démocratie -- http://www.le-message.org


More information about the CMake mailing list