find_path.rst 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. find_path
  2. ---------
  3. .. |FIND_XXX| replace:: find_path
  4. .. |NAMES| replace:: NAMES name1 [name2 ...]
  5. .. |SEARCH_XXX| replace:: file in a directory
  6. .. |SEARCH_XXX_DESC| replace:: directory containing the named file
  7. .. |prefix_XXX_SUBDIR| replace:: ``<prefix>/include``
  8. .. |entry_XXX_SUBDIR| replace:: ``<entry>/include``
  9. .. |CMAKE_PREFIX_PATH_XXX| replace::
  10. ``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
  11. is set, and |CMAKE_PREFIX_PATH_XXX_SUBDIR|
  12. .. |CMAKE_XXX_PATH| replace:: :variable:`CMAKE_INCLUDE_PATH`
  13. .. |CMAKE_XXX_MAC_PATH| replace:: :variable:`CMAKE_FRAMEWORK_PATH`
  14. .. |SYSTEM_ENVIRONMENT_PATH_XXX| replace:: Directories in ``INCLUDE``.
  15. On Windows hosts:
  16. ``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
  17. is set, and |SYSTEM_ENVIRONMENT_PREFIX_PATH_XXX_SUBDIR|, and the
  18. directories in ``PATH`` itself.
  19. .. |CMAKE_SYSTEM_PREFIX_PATH_XXX| replace::
  20. ``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
  21. is set, and |CMAKE_SYSTEM_PREFIX_PATH_XXX_SUBDIR|
  22. .. |CMAKE_SYSTEM_XXX_PATH| replace::
  23. :variable:`CMAKE_SYSTEM_INCLUDE_PATH`
  24. .. |CMAKE_SYSTEM_XXX_MAC_PATH| replace::
  25. :variable:`CMAKE_SYSTEM_FRAMEWORK_PATH`
  26. .. |CMAKE_FIND_ROOT_PATH_MODE_XXX| replace::
  27. :variable:`CMAKE_FIND_ROOT_PATH_MODE_INCLUDE`
  28. .. include:: FIND_XXX.txt
  29. When searching for frameworks, if the file is specified as ``A/b.h``, then
  30. the framework search will look for ``A.framework/Headers/b.h``. If that
  31. is found the path will be set to the path to the framework. CMake
  32. will convert this to the correct ``-F`` option to include the file.