FindMPEG2.cmake 1.2 KB

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