find_path.rst 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. .. |FIND_PACKAGE_ROOT_PREFIX_PATH_XXX| replace::
  10. ``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
  11. is set, and |FIND_PACKAGE_ROOT_PREFIX_PATH_XXX_SUBDIR|
  12. .. |CMAKE_PREFIX_PATH_XXX| replace::
  13. ``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
  14. is set, and |CMAKE_PREFIX_PATH_XXX_SUBDIR|
  15. .. |CMAKE_XXX_PATH| replace:: :variable:`CMAKE_INCLUDE_PATH`
  16. .. |CMAKE_XXX_MAC_PATH| replace:: :variable:`CMAKE_FRAMEWORK_PATH`
  17. .. |SYSTEM_ENVIRONMENT_PATH_XXX| replace:: The directories in ``INCLUDE``
  18. and ``PATH``.
  19. .. |SYSTEM_ENVIRONMENT_PATH_WINDOWS_XXX| replace:: On Windows hosts:
  20. ``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
  21. is set, and |SYSTEM_ENVIRONMENT_PREFIX_PATH_XXX_SUBDIR|.
  22. .. |CMAKE_SYSTEM_PREFIX_PATH_XXX| replace::
  23. ``<prefix>/include/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE`
  24. is set, and |CMAKE_SYSTEM_PREFIX_PATH_XXX_SUBDIR|
  25. .. |CMAKE_SYSTEM_XXX_PATH| replace::
  26. :variable:`CMAKE_SYSTEM_INCLUDE_PATH`
  27. .. |CMAKE_SYSTEM_XXX_MAC_PATH| replace::
  28. :variable:`CMAKE_SYSTEM_FRAMEWORK_PATH`
  29. .. |CMAKE_FIND_ROOT_PATH_MODE_XXX| replace::
  30. :variable:`CMAKE_FIND_ROOT_PATH_MODE_INCLUDE`
  31. .. include:: FIND_XXX.txt
  32. When searching for frameworks, if the file is specified as ``A/b.h``, then
  33. the framework search will look for ``A.framework/Headers/b.h``. If that
  34. is found the path will be set to the path to the framework. CMake
  35. will convert this to the correct ``-F`` option to include the file.