aboutsummaryrefslogtreecommitdiff
path: root/cast/standalone_receiver/BUILD.gn
diff options
context:
space:
mode:
Diffstat (limited to 'cast/standalone_receiver/BUILD.gn')
-rw-r--r--cast/standalone_receiver/BUILD.gn27
1 files changed, 7 insertions, 20 deletions
diff --git a/cast/standalone_receiver/BUILD.gn b/cast/standalone_receiver/BUILD.gn
index 0de68ee4..27755fe8 100644
--- a/cast/standalone_receiver/BUILD.gn
+++ b/cast/standalone_receiver/BUILD.gn
@@ -2,20 +2,9 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/external_libraries.gni")
import("//build_overrides/build.gni")
-declare_args() {
- # These are only relevant for building the demo apps, which require external
- # headers/libraries be installed. Set them to true if your local system has
- # SDL2/FFMPEG installed. On Debian-like systems, the following should install
- # all the required headers and libraries:
- #
- # sudo apt-get install libsdl2-2.0 libsdl2-dev libavcodec libavcodec-dev \
- # libavformat libavformat-dev libavutil libavutil-dev
- have_sdl_for_demo_apps = false
- have_ffmpeg_for_demo_apps = false
-}
-
# Define the executable target only when the build is configured to use the
# standalone platform implementation; since this is itself a standalone
# application.
@@ -23,7 +12,6 @@ if (!build_with_chromium) {
executable("cast_receiver") {
sources = [
"main.cc",
- "memory_util.h",
]
deps = [
"../../platform",
@@ -32,9 +20,10 @@ if (!build_with_chromium) {
defines = []
include_dirs = []
+ lib_dirs = []
libs = []
- if (have_sdl_for_demo_apps && have_ffmpeg_for_demo_apps) {
- defines += [ "CAST_STREAMING_HAVE_EXTERNAL_LIBS_FOR_DEMO_APPS" ]
+ if (have_ffmpeg && have_libsdl2) {
+ defines += [ "CAST_STANDALONE_RECEIVER_HAVE_EXTERNAL_LIBS" ]
sources += [
"avcodec_glue.h",
"decoder.cc",
@@ -48,11 +37,9 @@ if (!build_with_chromium) {
"sdl_video_player.cc",
"sdl_video_player.h",
]
- libs += [
- "SDL2",
- "avcodec",
- "avutil",
- ]
+ include_dirs += ffmpeg_include_dirs + libsdl2_include_dirs
+ lib_dirs += ffmpeg_lib_dirs + libsdl2_lib_dirs
+ libs += ffmpeg_libs + libsdl2_libs
} else {
sources += [
"dummy_player.cc",