cmake find_program examples

Signatures

find_program (
  <VAR>
  name | NAMES name1 [name2 ...] [NAMES_PER_DIR]
  [HINTS [path | ENV var]...]
  [PATHS [path | ENV var]...]
  [REGISTRY_VIEW (64|32|64_32|32_64|HOST|TARGET|BOTH)]
  [PATH_SUFFIXES suffix1 [suffix2 ...]]
  [VALIDATOR function]
  [DOC "cache documentation string"]
  [NO_CACHE]
  [REQUIRED|OPTIONAL]
  [NO_DEFAULT_PATH]
  [NO_PACKAGE_ROOT_PATH]
  [NO_CMAKE_PATH]
  [NO_CMAKE_ENVIRONMENT_PATH]
  [NO_SYSTEM_ENVIRONMENT_PATH]
  [NO_CMAKE_SYSTEM_PATH]
  [NO_CMAKE_INSTALL_PREFIX]
  [CMAKE_FIND_ROOT_PATH_BOTH |
  ONLY_CMAKE_FIND_ROOT_PATH |
  NO_CMAKE_FIND_ROOT_PATH]
)

Examples

moneymanagerex/moneymanagerex util/FindwxWidgets.cmake :878

find_program(_cygpath_exe cygpath ONLY_CMAKE_FIND_ROOT_PATH)

KiCad/kicad-source-mirror cmake/FindwxWidgets.cmake :766

find_program(wxWidgets_CONFIG_EXECUTABLE
      NAMES wx-config wx-config-3.1 wx-config-3.0 wx-config-2.9 wx-config-2.8
      DOC "Location of wxWidgets library configuration provider binary (wx-config)."
      ONLY_CMAKE_FIND_ROOT_PATH
      )

johmathe/shotdetect cmake/FindwxWidgets.cmake :707

FIND_PROGRAM(wxWidgets_CONFIG_EXECUTABLE wx-config
      ONLY_CMAKE_FIND_ROOT_PATH
      )