FindMPEG2.cmake 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #
  2. # Find the native MPEG2 includes and library
  3. #
  4. # This module defines
  5. # MPEG2_INCLUDE_DIR, where to find mpeg2dec/mpeg2.h, etc.
  6. # MPEG2_LIBRARIES, the libraries to link against to use MPEG2.
  7. # MPEG2_FOUND, If false, do not try to use MPEG2.
  8. # also defined, but not for general use are
  9. # MPEG2_mpeg2_LIBRARY, where to find the MPEG2 library.
  10. # MPEG2_vo_LIBRARY, where to find the vo library.
  11. FIND_PATH(MPEG2_INCLUDE_DIR mpeg2.h
  12. /usr/local/include
  13. /usr/include
  14. /usr/local/livid
  15. )
  16. FIND_LIBRARY(MPEG2_mpeg2_LIBRARY mpeg2
  17. /usr/local/lib
  18. /usr/lib
  19. /usr/local/livid/mpeg2dec/libmpeg2/.libs
  20. )
  21. FIND_LIBRARY( MPEG2_vo_LIBRARY vo
  22. /usr/local/lib
  23. /usr/lib
  24. /usr/local/livid/mpeg2dec/libvo/.libs
  25. )
  26. SET( MPEG2_FOUND "NO" )
  27. IF(MPEG2_INCLUDE_DIR)
  28. IF(MPEG2_mpeg2_LIBRARY)
  29. SET( MPEG2_FOUND "YES" )
  30. SET( MPEG2_LIBRARIES ${MPEG2_mpeg2_LIBRARY}
  31. ${MPEG2_vo_LIBRARY})
  32. #some native mpeg2 installations will depend
  33. #on libSDL, if found, add it in.
  34. INCLUDE( ${MODULE_PATH}/NewCMake/FindSDL.cmake )
  35. IF(SDL_FOUND)
  36. SET( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY})
  37. ENDIF(SDL_FOUND)
  38. ENDIF(MPEG2_mpeg2_LIBRARY)
  39. ENDIF(MPEG2_INCLUDE_DIR)