![]() Search paths will be tested as normal, with the suffix appended, and with If the CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX variable is set all When a full path to aįramework is used as a library, CMake will use a -framework A, and a If the library found is a framework, then will be set to the full This can be used to locate static libraries on UNIX-like systems. May specify library file names such as libfoo.a directly. The NAMES_PER_DIR option tells this command to consider oneĭirectory at a time and search for all names in it.Įach library name given to the NAMES option is first consideredĪs a library file name and then considered with platform-specific When more than one value is given to the NAMES option this command byĭefault will consider one name at a time and search every directoryįor it. Once one of the calls succeeds the result variable will be setĪnd stored in the cache so that no call will search again. Multiple times and using the NO_* options:įind_library ( NAMES name PATHS paths. Projects may override the order by simply calling the command The default search order is designed to be most-specific to ONLY_CMAKE_FIND_ROOT_PATH Search only the re-rooted directories and directories below NO_CMAKE_FIND_ROOT_PATH Do not use the CMAKE_FIND_ROOT_PATH variable. Overridden on a per-call basis using options: CMAKE_FIND_ROOT_PATH_BOTH Search in the order described above. The default behavior can be adjusted by settingĬMAKE_FIND_ROOT_PATH_MODE_LIBRARY. By default at first the directories listed inĬMAKE_FIND_ROOT_PATH are searched, then the CMAKE_SYSROOTĭirectory is searched, and then the non-rooted directories will be Point to the root directory of the target environment and CMake will These variables are especially useful when cross-compiling to See the documentation for that variable for more. Setting CMAKE_SYSROOT also has otherĮffects. The CMAKE_SYSROOT variable can also be used to specify exactly oneĭirectory to use as a prefix. Paths which are descendants of the CMAKE_STAGING_PREFIX are excludedįrom this re-rooting, because that variable is always a path on the host system.īy default the CMAKE_FIND_ROOT_PATH is empty. ThisĮffectively “re-roots” the entire search under given locations. ![]() The CMake variable CMAKE_FIND_ROOT_PATH specifies one or moreĭirectories to be prepended to all other search directories. Preference between Apple-style and unix-style package components. Or in the short-hand version of the command.ĬMAKE_FIND_APPBUNDLE variables determine the order of Search the paths specified by the PATHS option.This can be skipped if NO_CMAKE_SYSTEM_PATH Search cmake variables defined in the Platform filesįor the current system.lib/ if CMAKE_LIBRARY_ARCHITECTURE is set, This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument. Search the standard system environment variables.Hard-coded guesses should be specified with the PATHS option. Hint provided by the location of another item already found. These should be paths computed by system introspection, such as a Search the paths specified by the HINTS option.This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed. These are intended to be set in the user’s shell configuration,Īnd therefore use the host’s native path separator Search paths specified in cmake-specific environment variables./lib/ if CMAKE_LIBRARY_ARCHITECTURE is set,.This can be skipped if NO_CMAKE_PATH is passed. ![]() These are intended to be used on the command line with a -DVAR=value. Search paths specified in cmake-specific cache variables.If NO_DEFAULT_PATH is not specified, the search process is as follows: If NO_DEFAULT_PATH is specified, then no additional paths are DOC Specify the documentation string for the cache entry. PATH_SUFFIXES Specify additional subdirectories to check below each directory The ENV var sub-option reads paths from a system environment HINTS, PATHS Specify directories to search in addition to the default locations. So that locally-built packages can be found before those Suffix, we recommend specifying the unversioned name first When using this to specify names with and without a version Specify one or more possible names for the library. Next time find_library is invoked with the same variable. NOTFOUND, and the search will be attempted again the If the library is found the result is stored in the variableĪnd the search will not be repeated unless the variable is cleared. Name | NAMES name1 Ī cache entry named by is created to store the result
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |