FindMPEG.cmake 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #.rst:
  2. # FindMPEG
  3. # --------
  4. #
  5. # Find the native MPEG includes and library
  6. #
  7. # This module defines
  8. #
  9. # ::
  10. #
  11. # MPEG_INCLUDE_DIR, where to find MPEG.h, etc.
  12. # MPEG_LIBRARIES, the libraries required to use MPEG.
  13. # MPEG_FOUND, If false, do not try to use MPEG.
  14. #
  15. # also defined, but not for general use are
  16. #
  17. # ::
  18. #
  19. # MPEG_mpeg2_LIBRARY, where to find the MPEG library.
  20. # MPEG_vo_LIBRARY, where to find the vo library.
  21. #=============================================================================
  22. # Copyright 2002-2009 Kitware, Inc.
  23. #
  24. # Distributed under the OSI-approved BSD License (the "License");
  25. # see accompanying file Copyright.txt for details.
  26. #
  27. # This software is distributed WITHOUT ANY WARRANTY; without even the
  28. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  29. # See the License for more information.
  30. #=============================================================================
  31. # (To distribute this file outside of CMake, substitute the full
  32. # License text for the above reference.)
  33. find_path(MPEG_INCLUDE_DIR mpeg2dec/include/video_out.h
  34. /usr/local/livid
  35. )
  36. find_library(MPEG_mpeg2_LIBRARY mpeg2
  37. /usr/local/livid/mpeg2dec/libmpeg2/.libs
  38. )
  39. find_library( MPEG_vo_LIBRARY vo
  40. /usr/local/livid/mpeg2dec/libvo/.libs
  41. )
  42. # handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if
  43. # all listed variables are TRUE
  44. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  45. FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG DEFAULT_MSG MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY MPEG_vo_LIBRARY)
  46. if(MPEG_FOUND)
  47. set( MPEG_LIBRARIES ${MPEG_mpeg2_LIBRARY} ${MPEG_vo_LIBRARY} )
  48. endif()
  49. mark_as_advanced(MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY MPEG_vo_LIBRARY)