FindAVIFile.cmake 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # - Locate AVIFILE library and include paths
  2. # AVIFILE (http://avifile.sourceforge.net/)is a set of libraries for
  3. # i386 machines
  4. # to use various AVI codecs. Support is limited beyond Linux. Windows
  5. # provides native AVI support, and so doesn't need this library.
  6. # This module defines
  7. # AVIFILE_INCLUDE_DIR, where to find avifile.h , etc.
  8. # AVIFILE_LIBRARIES, the libraries to link against
  9. # AVIFILE_DEFINITIONS, definitions to use when compiling
  10. # AVIFILE_FOUND, If false, don't try to use AVIFILE
  11. #=============================================================================
  12. # Copyright 2002-2009 Kitware, Inc.
  13. #
  14. # Distributed under the OSI-approved BSD License (the "License");
  15. # see accompanying file Copyright.txt for details.
  16. #
  17. # This software is distributed WITHOUT ANY WARRANTY; without even the
  18. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  19. # See the License for more information.
  20. #=============================================================================
  21. # (To distribute this file outside of CMake, substitute the full
  22. # License text for the above reference.)
  23. IF (UNIX)
  24. FIND_PATH(AVIFILE_INCLUDE_DIR avifile.h
  25. /usr/local/avifile/include
  26. /usr/local/include/avifile
  27. )
  28. FIND_LIBRARY(AVIFILE_AVIPLAY_LIBRARY aviplay
  29. /usr/local/avifile/lib
  30. )
  31. ENDIF (UNIX)
  32. # handle the QUIETLY and REQUIRED arguments and set AVIFILE_FOUND to TRUE if
  33. # all listed variables are TRUE
  34. INCLUDE(FindPackageHandleStandardArgs)
  35. FIND_PACKAGE_HANDLE_STANDARD_ARGS(AVIFile DEFAULT_MSG AVIFILE_INCLUDE_DIR AVIFILE_AVIPLAY_LIBRARY)
  36. IF (AVIFILE_FOUND)
  37. SET(AVIFILE_LIBRARIES ${AVIFILE_AVIPLAY_LIBRARY})
  38. SET(AVIFILE_DEFINITIONS "")
  39. ENDIF()
  40. MARK_AS_ADVANCED(AVIFILE_INCLUDE_DIR AVIFILE_AVIPLAY_LIBRARY)