

Replacement set of possible configuration file names may be given TheĬommand searches for a file called Config.cmake or Is given the names following it are used instead of. Mode is also implied by use of options not specified in the reducedĬonfig mode attempts to locate a configuration file provided by the The CONFIG option may be used to skip Module mode explicitly and The complete Config mode command signature is:įind_package ( ] ] ] ] ] ] ) Option is not given the command proceeds to Config mode. Manyįind-modules provide limited or no support for versioning check It is responsible for finding the package,Ĭhecking the version, and producing any needed messages. If the file is found, it is readĪnd processed by CMake.

CMake searches for a fileĬalled Find.cmake in the CMAKE_MODULE_PATHįollowed by the CMake installation. Invoked with the above reduced signature. Module mode is available when the command is The command has two modes by which it searches for packages: “Module” Maintainers wishing to provide a package to be found by this command The remainder of this command documentation specifies theįull command signature and details of the search process.
CMAKE FIND PACKAGE CODE
User code should generally look for packages using the above simple Package-by-package basis (details below). Version support is currently provided only on a Inside a find-module, the corresponding arguments are forwardedĪutomatically from the outer call (including the EXACT flag for and/or component list is given to a recursive invocation TheĮXACT option requests that the version be matched exactly. Should be compatible (format is major]]). The argument requests a version with which the package found Whether a package is considered to be found are defined by the target Available components and their influence on REQUIRED option stops processing with an error message if the packageĪ package-specific list of required components may be listed after theĬOMPONENTS option (or after the REQUIRED option if present).Īdditional optional components may be listed after MODULE option disables the second signature documented below. QUIET option disables messages if the package cannot be found. Variables and Imported Targets documented by the package itself. Package is found package-specific information is provided through Will be set to indicate whether the package was found. Find_package ( ] )įinds and loads settings from an external project.
