![]() Major version if requested, else 0 PACKAGE_FIND_VERSION_MINOR Variables have been defined: PACKAGE_FIND_NAMEįull requested version string PACKAGE_FIND_VERSION_MAJOR Version file is loaded in a nested scope in which the following Is found it is loaded to check the requested version number. A basic version file containing generic versionĬMakePackageConfigHelpers module. Then the configuration file is assumed to not be compatible with any ![]() cmake the corresponding version file is located next For a candidate package configuration file Numbers are checked by “version” files provided by the packages CMake does not establish anyĬonvention for the meaning of version numbers. ![]() Option is given only a version of the package claiming an exact match Version of the package that claims compatibility with the requested When the argument is given Config mode will only find a _DIR has been set to a directory not containing aĬonfiguration file CMake will ignore it and search from scratch. If REQUIRED is specified and the package is not found aįatal error is generated and the configure step stops executing. If the package configuration file cannot be found CMake will generateĪn error describing the problem unless the QUIET argument is The associated versions in _CONSIDERED_VERSIONS. Version are stored in the cmake variable _CONSIDERED_CONFIGS, Searching for an installation of the package with an appropriate The full path to the configuration fileĪll configuration files which have been considered by CMake while Since the file is provided by the package it already knows the Once found, the configuration file is read and processed by CMake. 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. 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. I find the following approach to be better in case you don't have access to modify third parties repositories CMakeLists.Find_package ( ] )įinds and loads settings from an external project. However FindZlib.cmake prioritizes the dynamic version. Zlib doesn't have the option to build statically or dynamically, it automatically generates both versions. If you have control over installing zlib, for example, you are installing dependencies in a Continuous Integration setup, I would recommend to just remove the zlib dynamic library.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |