FindAVIFile.cmake 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 library and include paths
  7. AVIFILE (http://avifile.sourceforge.net/) is a set of libraries for
  8. i386 machines to use various AVI codecs. Support is limited beyond
  9. Linux. Windows provides native AVI support, and so doesn't need this
  10. library. This module defines
  11. ::
  12. AVIFILE_INCLUDE_DIR, where to find avifile.h , etc.
  13. AVIFILE_LIBRARIES, the libraries to link against
  14. AVIFILE_DEFINITIONS, definitions to use when compiling
  15. AVIFILE_FOUND, If false, don't try to use AVIFILE
  16. #]=======================================================================]
  17. if (UNIX)
  18. find_path(AVIFILE_INCLUDE_DIR avifile.h PATH_SUFFIXES avifile/include include/avifile include/avifile-0.7)
  19. find_library(AVIFILE_AVIPLAY_LIBRARY aviplay aviplay-0.7 PATH_SUFFIXES avifile/lib)
  20. endif ()
  21. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  22. FIND_PACKAGE_HANDLE_STANDARD_ARGS(AVIFile DEFAULT_MSG AVIFILE_INCLUDE_DIR AVIFILE_AVIPLAY_LIBRARY)
  23. if (AVIFILE_FOUND)
  24. set(AVIFILE_LIBRARIES ${AVIFILE_AVIPLAY_LIBRARY})
  25. set(AVIFILE_DEFINITIONS "")
  26. endif()
  27. mark_as_advanced(AVIFILE_INCLUDE_DIR AVIFILE_AVIPLAY_LIBRARY)