aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake/GStreamer010Plugin.cmake
blob: d05cb9c07ad3eb05c19baba8603c440f1f40981f (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
# -*- cmake -*-
include(Prebuilt)

if (STANDALONE)
  include(FindPkgConfig)

  pkg_check_modules(GSTREAMER010 REQUIRED gstreamer-0.10)
  pkg_check_modules(GSTREAMER010_PLUGINS_BASE REQUIRED gstreamer-plugins-base-0.10)

else (STANDALONE)

  # Possibly libxml and glib should have their own .cmake file instead...
  use_prebuilt_binary(gstreamer)	# includes glib, libxml, and iconv on Windows
  use_prebuilt_binary(gstreamer-plugins)
  set(GSTREAMER010_FOUND ON FORCE BOOL)
  set(GSTREAMER010_PLUGINS_BASE_FOUND ON FORCE BOOL)
  if (WINDOWS)
    set(GSTREAMER010_INCLUDE_DIRS
		${LIBS_PREBUILT_DIR}/include/gstreamer-0.10
		${LIBS_PREBUILT_DIR}/include/glib
		${LIBS_PREBUILT_DIR}/include/libxml2
		)
  else (WINDOWS)
      use_prebuilt_binary(glib)			# gstreamer needs glib
      if (DARWIN)

         use_prebuilt_binary(libxml)
         set(GSTREAMER010_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/libxml2
            )
       else (DARWIN)
         add_definitions(-DGST_DISABLE_XML -DGST_DISABLE_LOADSAVE)
         set(GSTREAMER010_INCLUDE_DIRS
                ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gstreamer-0.10
                ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0
            )
      endif (DARWIN)
  endif (WINDOWS)

endif (STANDALONE)

if (WINDOWS)
  # We don't need to explicitly link against gstreamer itself, because
  # LLMediaImplGStreamer probes for the system's copy at runtime.
    set(GSTREAMER010_LIBRARIES
         gstaudio-0.10.lib
         gstbase-0.10.lib
         gstreamer-0.10.lib
         gstvideo-0.10.lib #slvideoplugin
		 gstinterfaces-0.10.lib
         gobject-2.0
         gmodule-2.0
         gthread-2.0
         glib-2.0
         )
else (WINDOWS)
  # We don't need to explicitly link against gstreamer itself, because
  # LLMediaImplGStreamer probes for the system's copy at runtime.
    set(GSTREAMER010_LIBRARIES
         gstvideo-0.10
         gstaudio-0.10
         gstbase-0.10
         gstreamer-0.10
         gobject-2.0
         gmodule-2.0
         dl
         gthread-2.0
         rt
         glib-2.0
         )


endif (WINDOWS)


if (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND)
  set(GSTREAMER010 ON CACHE BOOL "Build with GStreamer-0.10 streaming media support.")
  add_definitions(-DLL_GSTREAMER010_ENABLED=1)
endif (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND)