FindAVIFile.cmake 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #.rst:
  2. # FindAVIFile
  3. # -----------
  4. #
  5. # Locate AVIFILE library and include paths
  6. #
  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. # ::
  13. #
  14. # AVIFILE_INCLUDE_DIR, where to find avifile.h , etc.
  15. # AVIFILE_LIBRARIES, the libraries to link against
  16. # AVIFILE_DEFINITIONS, definitions to use when compiling
  17. # AVIFILE_FOUND, If false, don't try to use AVIFILE
  18. #=============================================================================
  19. # Copyright 2002-2009 Kitware, Inc.
  20. #
  21. # Distributed under the OSI-approved BSD License (the "License");
  22. # see accompanying file Copyright.txt for details.
  23. #
  24. # This software is distributed WITHOUT ANY WARRANTY; without even the
  25. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  26. # See the License for more information.
  27. #=============================================================================
  28. # (To distribute this file outside of CMake, substitute the full
  29. # License text for the above reference.)
  30. if (UNIX)
  31. find_path(AVIFILE_INCLUDE_DIR avifile.h
  32. /usr/local/avifile/include
  33. /usr/local/include/avifile
  34. )
  35. find_library(AVIFILE_AVIPLAY_LIBRARY aviplay
  36. /usr/local/avifile/lib
  37. )
  38. endif ()
  39. # handle the QUIETLY and REQUIRED arguments and set AVIFILE_FOUND to TRUE if
  40. # all listed variables are TRUE
  41. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  42. FIND_PACKAGE_HANDLE_STANDARD_ARGS(AVIFile DEFAULT_MSG AVIFILE_INCLUDE_DIR AVIFILE_AVIPLAY_LIBRARY)
  43. if (AVIFILE_FOUND)
  44. set(AVIFILE_LIBRARIES ${AVIFILE_AVIPLAY_LIBRARY})
  45. set(AVIFILE_DEFINITIONS "")
  46. endif()
  47. mark_as_advanced(AVIFILE_INCLUDE_DIR AVIFILE_AVIPLAY_LIBRARY)