CMake/Tutorials/Package Registry: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
(Created page with "CMake provides two central locations to register packages that have been built or installed anywhere on a system: * User Package Registry * [[#System|System Package Re...")
 
(Replace content with link to new CMake community wiki)
 
(11 intermediate revisions by one other user not shown)
Line 1: Line 1:
CMake provides two central locations to register packages that have been built or installed anywhere on a system:
{{CMake/Template/Moved}}


* [[#User|User Package Registry]]
This page has moved [https://gitlab.kitware.com/cmake/community/wikis/doc/tutorials/Package-Registry here].
* [[#System|System Package Registry]]
 
Each registry lists for a specific package name a list of directories in which <code>find_package</code> should search for package configuration files (<package>Config.cmake).
 
==User==
 
The ''User Package Registry'' is stored in a per-user location.
A project may use the <code>export(PACKAGE)</code> command to register its build tree in the user package registry.
A package installer may populate the registry using its own means to refer to the install location.
 
On Windows the user package registry is stored in the Windows registry under a key in <code>HKEY_CURRENT_USER</code>.
A <code><package></code> may appear under registry key
 
  HKEY_CURRENT_USER\Software\Kitware\CMake\Packages\<package>
 
as a <code>REG_SZ</code> value, with arbitrary name, that specifies the directory containing the package configuration file.
 
On UNIX platforms the user package registry is stored in the user home directory under <code>~/.cmake/packages</code>.
A <code><package></code> may appear under the directory
 
  ~/.cmake/packages/<package>
 
as a file, with arbitrary name, whose content specifies the directory containing the package configuration file.
 
==System==
 
The ''System Package Registry'' is stored in a system-wide location.
A package installer may populate the registry using its own means to refer to the install location.
 
On Windows the system package registry is stored in the Windows registry under a key in <code>HKEY_LOCAL_MACHINE</code>.
A <code><package></code> may appear under registry key
 
  HKEY_LOCAL_MACHINE\Software\Kitware\CMake\Packages\<package>
 
as a <code>REG_SZ</code> value, with arbitrary name, that specifies the directory containing the package configuration file.
 
There is no system package registry on non-Windows platforms.

Latest revision as of 15:40, 30 April 2018


The CMake community Wiki has moved to the Kitware GitLab Instance.

This page has moved here.