find_path.rst 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. ``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
  16. is set, and |SYSTEM_ENVIRONMENT_PREFIX_PATH_XXX_SUBDIR|, and the
  17. directories in ``PATH`` itself.
  18. .. |CMAKE_SYSTEM_PREFIX_PATH_XXX| replace::
  19. ``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
  20. is set, and |CMAKE_SYSTEM_PREFIX_PATH_XXX_SUBDIR|
  21. .. |CMAKE_SYSTEM_XXX_PATH| replace::
  22. :variable:`CMAKE_SYSTEM_INCLUDE_PATH`
  23. .. |CMAKE_SYSTEM_XXX_MAC_PATH| replace::
  24. :variable:`CMAKE_SYSTEM_FRAMEWORK_PATH`
  25. .. |CMAKE_FIND_ROOT_PATH_MODE_XXX| replace::
  26. :variable:`CMAKE_FIND_ROOT_PATH_MODE_INCLUDE`
  27. .. include:: FIND_XXX.txt
  28. When searching for frameworks, if the file is specified as ``A/b.h``, then
  29. the framework search will look for ``A.framework/Headers/b.h``. If that
  30. is found the path will be set to the path to the framework. CMake
  31. will convert this to the correct ``-F`` option to include the file.