aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake/GStreamer.cmake
blob: 8467dcd79ed75adb0538926f58883e9aba384c4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# -*- cmake -*-
include(Prebuilt)

  # possible libxml should have its own .cmake file instead
  use_prebuilt_binary(libxml)
  set(GSTREAMER_FOUND ON FORCE BOOL)
  set(GSTREAMER_PLUGINS_BASE_FOUND ON FORCE BOOL)
  use_prebuilt_binary(gstreamer)

if (WINDOWS)

  use_prebuilt_binary(libxml)
  use_prebuilt_binary(iconv)
  use_prebuilt_binary(gstreamer-plugins)
  set(GSTREAMER_FOUND ON FORCE BOOL)
  set(GSTREAMER_INCLUDE_DIRS
      ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib
      ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gio
      ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gobject
      ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/libxml2
      ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/iconv
      ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gst
      )

  set(GSTREAMER_LIBRARIES
      glib-2.0
      gio-2.0
      gmodule-2.0
      gobject-2.0
      gthread-2.0
      libgstvideo-0.10
      libgsttag-0.10
      libgstsdp-0.10
      libgstrtsp-0.10
      libgstrtp-0.10
      libgstriff-0.10
      libgstreamer-0.10
      libgstpbutils-0.10
      libgstnetbuffer-0.10
      libgstnet-0.10
      libgstinterfaces-0.10
      libgstdshow-0.10
      libgstdataprotocol-0.10
      libgstcontroller-0.10
      libgstbase-0.10
      libgstaudio-0.10
      libgstapp-0.10
      libxml2
      libxml2_a
      libxml2_a_dll
      iconv
      iconv_a
      )

else (WINDOWS)

  set(GSTREAMER_INCLUDE_DIRS
      ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gstreamer-0.10
      ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0
      ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0/glib
      ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0/gobject
      ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/libxml2
      )

  if (DARWIN)

    set(GSTREAMER_LIBRARIES
        xml2
        glib-2.0
        gobject-2.0
        gmodule-2.0
        gthread-2.0
        gstreamer-0.10
        )

  else (DARWIN)

    include(FindPkgConfig)

    pkg_check_modules(GSTREAMER REQUIRED gstreamer-0.10)
    pkg_check_modules(GSTREAMER_PLUGINS_BASE REQUIRED gstreamer-plugins-base-0.10)

    # We don't need to explicitly link against gstreamer itself, because
    # LLMediaImplGStreamer probes for the system's copy at runtime.
    set(GSTREAMER_LIBRARIES
        gobject-2.0
        gmodule-2.0
        dl
        gthread-2.0
        rt
        glib-2.0
        )

  endif (DARWIN)

endif (WINDOWS)

if (GSTREAMER_FOUND AND GSTREAMER_PLUGINS_BASE_FOUND)
  set(GSTREAMER ON CACHE BOOL "Build with GStreamer streaming media support.")
endif (GSTREAMER_FOUND AND GSTREAMER_PLUGINS_BASE_FOUND)

if (GSTREAMER)
  add_definitions(-DLL_GSTREAMER_ENABLED=1)
endif (GSTREAMER)