1CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY
2--------------------------------------
3
4.. versionadded:: 3.16
5
6Controls searching the :ref:`System Package Registry` by the
7:command:`find_package` command.
8
9By default this variable is not set and the behavior will fall back
10to that determined by the deprecated
11:variable:`CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY` variable.
12If that is also not set, then :command:`find_package()` will use the
13:ref:`System Package Registry` unless the ``NO_CMAKE_SYSTEM_PACKAGE_REGISTRY``
14option is provided.
15
16This variable takes precedence over
17:variable:`CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY` when both are set.
18
19In some cases, for example to locate only user specific installations, it
20is not desirable to use the :ref:`System Package Registry` when searching
21for packages. If the ``CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY``
22variable is ``FALSE``, all the :command:`find_package` commands will skip
23the :ref:`System Package Registry` as if they were called with the
24``NO_CMAKE_SYSTEM_PACKAGE_REGISTRY`` argument.
25
26See also :ref:`Disabling the Package Registry`.
27
28See also the :variable:`CMAKE_FIND_USE_CMAKE_PATH`,
29:variable:`CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH`,
30:variable:`CMAKE_FIND_USE_CMAKE_SYSTEM_PATH`,
31:variable:`CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH`,
32:variable:`CMAKE_FIND_USE_PACKAGE_REGISTRY`,
33and :variable:`CMAKE_FIND_USE_PACKAGE_ROOT_PATH` variables.
34