https://public.kitware.com/Wiki/api.php?action=feedcontributions&user=Dr+memory&feedformat=atomKitwarePublic - User contributions [en]2024-03-29T07:08:31ZUser contributionsMediaWiki 1.38.6https://public.kitware.com/Wiki/index.php?title=CMake:CPackConfiguration&diff=37767CMake:CPackConfiguration2011-02-18T00:47:34Z<p>Dr memory: add CPACK_PACKAGING_INSTALL_PREFIX</p>
<hr />
<div>The CPack behavior is controlled by the value of ''CPACK_XXXX'' variables.<br />
The value of thoses variables should usually be set inside ''CMakeLists.txt'' '''before''' the inclusion <br />
''INCLUDE(CPack)''.<br />
Some variables may be set/overriden on the command line when invoking CPack, like in:<br />
<br />
cpack -D CPACK_MONOLITHIC_INSTALL=1 -G NSIS<br />
<br />
The variables described hereafter are the '''generic''' ones used to adjust the behaviour of<br />
any CPack generator. However, some CPack generator have extra specific variables (CPACK_<GENERATOR-NAME>_XXXX) that may be used too control their specific features.<br />
If you seek CPack generators specific settings please go there:<br />
[http://www.cmake.org/Wiki/CMake:CPackPackageGenerators CPackPackageGenerators]<br />
<br />
=Basic settings=<br />
<br />
{|<br />
|- bgcolor="#abcdef"<br />
! Variable Name || Description || Example<br />
|-<br />
| CPACK_GENERATOR || CPack generator to be used || STGZ;TGZ;TZ<br />
|- <br />
| CPACK_INCLUDE_TOPLEVEL_DIRECTORY || Controls whether CPack adds a top-level directory, usually of the form ProjectName-Version-OS, to the top of package tree. || 0 to disable, 1 to enable<br />
|-<br />
| CPACK_INSTALL_CMAKE_PROJECTS || List of four values: Build directory, Project Name, Project Component, Directory in the package || /home/andy/vtk/CMake-bin;CMake;ALL;/<br />
|-<br />
| CPACK_PACKAGE_DESCRIPTION_FILE || File used as a description of a project || /path/to/project/ReadMe.txt<br />
|-<br />
| CPACK_PACKAGE_DESCRIPTION_SUMMARY || Description summary of a project || CMake is a build tool<br />
|-<br />
| CPACK_PACKAGE_EXECUTABLES || List of pairs of executables and labels. Used by the NSIS generator to create Start Menu shortcuts. || ccmake;CMake<br />
|-<br />
| CPACK_PACKAGE_FILE_NAME || Package file name without extension. Also a directory of installer || cmake-2.5.0-Linux-i686<br />
|-<br />
| CPACK_PACKAGE_INSTALL_DIRECTORY || Installation directory on the target system || CMake 2.5<br />
|-<br />
| CPACK_PACKAGE_INSTALL_REGISTRY_KEY || Registry key used when installing this project || CMake 2.5.0<br />
|-<br />
| CPACK_PACKAGE_NAME || Package name, defaults to the project name. || CMake<br />
|-<br />
| CPACK_PACKAGE_VENDOR || Package vendor name || Kitware<br />
|-<br />
| CPACK_PACKAGE_VERSION_MAJOR || Package Major Version || 2<br />
|- <br />
| CPACK_PACKAGE_VERSION_MINOR || Package Minor Version || 5<br />
|- <br />
| CPACK_PACKAGE_VERSION_PATCH || Package Patch Version || 0<br />
|- <br />
| CPACK_PROJECT_CONFIG_FILE || File included at cpack time, once per generator after setting CPACK_GENERATOR to the actual generator being used; allows per-generator setting of CPACK_* variables at cpack time. || ${PROJECT_BINARY_DIR}/CPackOptions.cmake<br />
|-<br />
| CPACK_SOURCE_GENERATOR || List of generators used for the source package || TGZ;TZ<br />
|- <br />
| CPACK_SOURCE_IGNORE_FILES || Pattern of files in the source tree that won't be packaged || /CVS/;/\\.svn/;\\.swp$;\\.#;/#;.*~;cscope.*<br />
|- <br />
| CPACK_SOURCE_PACKAGE_FILE_NAME || Name of the source package || cmake-2.5.0<br />
|- <br />
| CPACK_SOURCE_STRIP_FILES || List of files in the source tree that will be stripped. Starting with CMake 2.6.0 CPACK_SOURCE_STRIP_FILES will be a boolean variable which enables stripping of all files (a list of files evaluates to TRUE in CMake, so this change is compatible). || <br />
|- <br />
| CPACK_STRIP_FILES || List of files to be stripped. Starting with CMake 2.6.0 CPACK_STRIP_FILES will be a boolean variable which enables stripping of all files (a list of files evaluates to TRUE in CMake, so this change is compatible). || bin/ccmake;bin/cmake;bin/cpack;bin/ctest<br />
|-<br />
| CPACK_SYSTEM_NAME || System name, defaults to the value of ${CMAKE_SYSTEM_NAME}. || Linux-i686<br />
|}<br />
<br />
=Advanced settings=<br />
<br />
{|<br />
|- bgcolor="#abcdef"<br />
! Variable Name || Description || Example<br />
|-<br />
| CPACK_CMAKE_GENERATOR || What CMake generator should be used if the project is CMake project. Defaults to the value of CMAKE_GENERATOR. || Unix Makefiles<br />
|-<br />
| CPACK_RESOURCE_FILE_LICENSE || License file for the project, used by the STGZ, NSIS, and PackageMaker generators. || /home/andy/vtk/CMake/Copyright.txt<br />
|- <br />
| CPACK_RESOURCE_FILE_README || ReadMe file for the project, used by PackageMaker generator. || /home/andy/vtk/CMake/Templates/CPack.GenericDescription.txt<br />
|- <br />
| CPACK_RESOURCE_FILE_WELCOME || Welcome file for the project, used by PackageMaker generator. || /home/andy/vtk/CMake/Templates/CPack.GenericWelcome.txt<br />
|- <br />
| CPACK_PACKAGE_VERSION || Package full version, used internally. || 2.5.0<br />
|-<br />
| CPACK_TOPLEVEL_TAG || Directory for the installed files. || Linux-i686<br />
|-<br />
| CPACK_INSTALL_COMMANDS || Extra commands to install components. ||<br />
|-<br />
| CPACK_INSTALL_DIRECTORIES || Extra directories to install. ||<br />
|-<br />
| CPACK_MONOLITHIC_INSTALL || When set disables the component-based installer. ||<br />
|-<br />
| CPACK_PACKAGING_INSTALL_PREFIX || Sets the default root that the generated package installs into, '/usr' is the default for the debian and redhat generators || /usr/local<br />
|}</div>Dr memory