FindQuickTime.cmake 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file LICENSE.rst or https://cmake.org/licensing for details.
  3. #[=======================================================================[.rst:
  4. FindQuickTime
  5. -------------
  6. Finds the QuickTime multimedia framework, which provides support for video,
  7. audio, and interactive media:
  8. .. code-block:: cmake
  9. find_package(QuickTime [...])
  10. .. note::
  11. This module is for the QuickTime framework, which has been deprecated by Apple
  12. and is no longer supported. On Apple systems, use AVFoundation and AVKit
  13. instead.
  14. Result Variables
  15. ^^^^^^^^^^^^^^^^
  16. This module defines the following variables:
  17. ``QuickTime_FOUND``
  18. .. versionadded:: 3.3
  19. Boolean indicating whether QuickTime was found.
  20. Cache Variables
  21. ^^^^^^^^^^^^^^^
  22. The following cache variables may also be set:
  23. ``QUICKTIME_LIBRARY``
  24. The path to the QuickTime library.
  25. ``QUICKTIME_INCLUDE_DIR``
  26. Directory containing QuickTime headers.
  27. Hints
  28. ^^^^^
  29. This module accepts the following variables:
  30. ``QUICKTIME_DIR``
  31. Environment variable that can be set to help locate a QuickTime library
  32. installed in a custom location. It should point to the installation
  33. destination that was used when configuring, building, and installing QuickTime
  34. library: ``./configure --prefix=$QUICKTIME_DIR``.
  35. Deprecated Variables
  36. ^^^^^^^^^^^^^^^^^^^^
  37. The following variables are provided for backward compatibility:
  38. ``QUICKTIME_FOUND``
  39. .. deprecated:: 4.2
  40. Use ``QuickTime_FOUND``, which has the same value.
  41. Boolean indicating whether QuickTime was found.
  42. Examples
  43. ^^^^^^^^
  44. Finding QuickTime library and creating an imported interface target for
  45. linking it to a project target:
  46. .. code-block:: cmake
  47. find_package(QuickTime)
  48. if(QuickTime_FOUND AND NOT TARGET QuickTime::QuickTime)
  49. add_library(QuickTime::QuickTime INTERFACE IMPORTED)
  50. set_target_properties(
  51. QuickTime::QuickTime
  52. PROPERTIES
  53. INTERFACE_INCLUDE_DIRECTORIES "${QUICKTIME_INCLUDE_DIR}"
  54. INTERFACE_LINK_LIBRARIES "${QUICKTIME_LIBRARY}"
  55. )
  56. endif()
  57. target_link_libraries(example PRIVATE QuickTime::QuickTime)
  58. #]=======================================================================]
  59. find_path(QUICKTIME_INCLUDE_DIR QuickTime/QuickTime.h QuickTime.h
  60. HINTS
  61. ENV QUICKTIME_DIR
  62. PATH_SUFFIXES
  63. include
  64. )
  65. find_library(QUICKTIME_LIBRARY QuickTime
  66. HINTS
  67. ENV QUICKTIME_DIR
  68. PATH_SUFFIXES
  69. lib
  70. )
  71. include(FindPackageHandleStandardArgs)
  72. find_package_handle_standard_args(QuickTime DEFAULT_MSG QUICKTIME_LIBRARY QUICKTIME_INCLUDE_DIR)