FindAVIFile.cmake 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. #[=======================================================================[.rst:
  4. FindAVIFile
  5. -----------
  6. Locate `AVIFILE <https://avifile.sourceforge.net/>`_
  7. library and include paths.
  8. AVIFILE is a set of libraries for
  9. i386 machines to use various AVI codecs. Support is limited beyond
  10. Linux. Windows provides native AVI support, and so doesn't need this
  11. library. This module defines
  12. ::
  13. AVIFILE_INCLUDE_DIR, where to find avifile.h , etc.
  14. AVIFILE_LIBRARIES, the libraries to link against
  15. AVIFILE_DEFINITIONS, definitions to use when compiling
  16. AVIFILE_FOUND, If false, don't try to use AVIFILE
  17. #]=======================================================================]
  18. if (UNIX)
  19. find_path(AVIFILE_INCLUDE_DIR avifile.h PATH_SUFFIXES avifile/include include/avifile include/avifile-0.7)
  20. find_library(AVIFILE_AVIPLAY_LIBRARY aviplay aviplay-0.7 PATH_SUFFIXES avifile/lib)
  21. endif ()
  22. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  23. find_package_handle_standard_args(AVIFile DEFAULT_MSG AVIFILE_INCLUDE_DIR AVIFILE_AVIPLAY_LIBRARY)
  24. if (AVIFILE_FOUND)
  25. set(AVIFILE_LIBRARIES ${AVIFILE_AVIPLAY_LIBRARY})
  26. set(AVIFILE_DEFINITIONS "")
  27. endif()
  28. mark_as_advanced(AVIFILE_INCLUDE_DIR AVIFILE_AVIPLAY_LIBRARY)