summaryrefslogtreecommitdiff
path: root/indra/cmake/GStreamer10Plugin.cmake
blob: 160844ef6892ea9c5b5cb288952e79fa8ba1eb0c (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
# -*- cmake -*-

include_guard()

include(Prebuilt)
include(GLIB)

add_library( ll::gstreamer10 INTERFACE IMPORTED )

if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
  include(FindPkgConfig)

  pkg_check_modules(GSTREAMER10 REQUIRED gstreamer-1.0)
  pkg_check_modules(GSTREAMER10_PLUGINS_BASE REQUIRED gstreamer-plugins-base-1.0)

  target_include_directories( ll::gstreamer10 SYSTEM INTERFACE ${GSTREAMER10_INCLUDE_DIRS})
  target_link_libraries( ll::gstreamer10 INTERFACE  ll::glib_headers)

endif ()

if (GSTREAMER10_FOUND AND GSTREAMER10_PLUGINS_BASE_FOUND)
  set(GSTREAMER10 ON CACHE BOOL "Build with GStreamer-1.0 streaming media support.")
endif (GSTREAMER10_FOUND AND GSTREAMER10_PLUGINS_BASE_FOUND)

if (GSTREAMER10)
  add_definitions(-DLL_GSTREAMER10_ENABLED=1)
endif (GSTREAMER10)