GStreamerPlugin.cmake 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # -*- cmake -*-
  2. if (GSTREAMER_CMAKE_INCLUDED)
  3. return()
  4. endif (GSTREAMER_CMAKE_INCLUDED)
  5. set (GSTREAMER_CMAKE_INCLUDED TRUE)
  6. include(Prebuilt)
  7. if (USESYSTEMLIBS)
  8. include(FindPkgConfig)
  9. pkg_check_modules(GSTREAMER gstreamer-1.0)
  10. pkg_check_modules(GSTREAMER_PLUGINS_BASE gstreamer-plugins-base-1.0)
  11. endif (USESYSTEMLIBS)
  12. if (NOT GSTREAMER_FOUND OR NOT GSTREAMER_PLUGINS_BASE_FOUND)
  13. use_prebuilt_binary(gstreamer)
  14. # possible libxml should have its own .cmake file instead
  15. use_prebuilt_binary(libxml2)
  16. set(GSTREAMER_INCLUDE_DIRS
  17. ${LIBS_PREBUILT_DIR}/include/gstreamer-1.0
  18. ${LIBS_PREBUILT_DIR}/include/glib-2.0
  19. ${LIBS_PREBUILT_DIR}/include/libxml2
  20. )
  21. if (LINUX)
  22. # We don't need to explicitly link against gstreamer itself, because
  23. # LLMediaImplGStreamer probes for the system's copy at runtime.
  24. set(GSTREAMER_LIBRARIES
  25. gobject-2.0
  26. gmodule-2.0
  27. dl
  28. gthread-2.0
  29. rt
  30. glib-2.0
  31. )
  32. elseif (DARWIN)
  33. # We don't need to explicitly link against gstreamer itself, because
  34. # LLMediaImplGStreamer probes for the system's copy at runtime.
  35. set(GSTREAMER_LIBRARIES
  36. gobject-2.0
  37. gmodule-2.0
  38. dl
  39. gthread-2.0
  40. glib-2.0
  41. )
  42. else (LINUX)
  43. set(GSTREAMER_LIBRARIES)
  44. endif (LINUX)
  45. endif (NOT GSTREAMER_FOUND OR NOT GSTREAMER_PLUGINS_BASE_FOUND)
  46. include_directories(SYSTEM ${GSTREAMER_INCLUDE_DIRS})