FindMPEG.cmake 1.6 KB

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