-
Notifications
You must be signed in to change notification settings - Fork 3
/
BUILD.gn
129 lines (123 loc) · 4.33 KB
/
BUILD.gn
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
if (is_win) {
baseclasses_dir = "Samples/multimedia/directshow/baseclasses"
config("winsdk_samples_config") {
if (is_win && is_clang) {
# When compiling with clang-cl, use -imsvc (similar to -isystem in clang)
# instead of include_dirs (-I), so we don't need to suppress warnings
# coming from this package in other projects.
cflags = [
"-imsvc",
rebase_path(baseclasses_dir, root_build_dir),
]
} else {
include_dirs = [ baseclasses_dir ]
}
}
# These warnings suppression flags are still needed even if -imsvc is used
# because some of them will trigger when .cpp files in this package are
# compiled.
config("winsdk_samples_warnings_config") {
if (is_win && is_clang) {
cflags = [
# Disable warnings failing when compiling with Clang on Windows.
# https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
"-Wno-comment",
"-Wno-delete-non-virtual-dtor",
"-Wno-ignored-attributes",
"-Wno-logical-op-parentheses",
"-Wno-non-pod-varargs",
"-Wno-microsoft-extra-qualification",
"-Wno-missing-braces",
"-Wno-overloaded-virtual",
"-Wno-parentheses",
"-Wno-reorder",
"-Wno-string-conversion",
"-Wno-tautological-constant-out-of-range-compare",
"-Wno-unknown-pragmas",
"-Wno-unused-private-field",
"-Wno-writable-strings",
]
}
}
static_library("winsdk_samples") {
sources = [
"$baseclasses_dir/amextra.cpp",
"$baseclasses_dir/amextra.h",
"$baseclasses_dir/amfilter.cpp",
"$baseclasses_dir/amfilter.h",
"$baseclasses_dir/amvideo.cpp",
"$baseclasses_dir/cache.h",
"$baseclasses_dir/combase.cpp",
"$baseclasses_dir/combase.h",
"$baseclasses_dir/cprop.cpp",
"$baseclasses_dir/cprop.h",
"$baseclasses_dir/ctlutil.cpp",
"$baseclasses_dir/ctlutil.h",
"$baseclasses_dir/ddmm.cpp",
"$baseclasses_dir/ddmm.h",
"$baseclasses_dir/dllentry.cpp",
"$baseclasses_dir/dllsetup.cpp",
"$baseclasses_dir/dllsetup.h",
"$baseclasses_dir/fourcc.h",
"$baseclasses_dir/measure.h",
"$baseclasses_dir/msgthrd.h",
"$baseclasses_dir/mtype.cpp",
"$baseclasses_dir/mtype.h",
"$baseclasses_dir/outputq.cpp",
"$baseclasses_dir/outputq.h",
"$baseclasses_dir/pstream.cpp",
"$baseclasses_dir/pstream.h",
"$baseclasses_dir/pullpin.cpp",
"$baseclasses_dir/pullpin.h",
"$baseclasses_dir/refclock.cpp",
"$baseclasses_dir/refclock.h",
"$baseclasses_dir/reftime.h",
"$baseclasses_dir/renbase.cpp",
"$baseclasses_dir/renbase.h",
"$baseclasses_dir/schedule.cpp",
"$baseclasses_dir/seekpt.cpp",
"$baseclasses_dir/seekpt.h",
"$baseclasses_dir/source.cpp",
"$baseclasses_dir/source.h",
"$baseclasses_dir/streams.h",
"$baseclasses_dir/strmctl.cpp",
"$baseclasses_dir/strmctl.h",
"$baseclasses_dir/sysclock.cpp",
"$baseclasses_dir/sysclock.h",
"$baseclasses_dir/transfrm.cpp",
"$baseclasses_dir/transfrm.h",
"$baseclasses_dir/transip.cpp",
"$baseclasses_dir/transip.h",
"$baseclasses_dir/videoctl.cpp",
"$baseclasses_dir/videoctl.h",
"$baseclasses_dir/vtrans.cpp",
"$baseclasses_dir/vtrans.h",
"$baseclasses_dir/winctrl.cpp",
"$baseclasses_dir/winctrl.h",
"$baseclasses_dir/winutil.cpp",
"$baseclasses_dir/winutil.h",
"$baseclasses_dir/wxdebug.cpp",
"$baseclasses_dir/wxdebug.h",
"$baseclasses_dir/wxlist.cpp",
"$baseclasses_dir/wxlist.h",
"$baseclasses_dir/wxutil.cpp",
"$baseclasses_dir/wxutil.h",
]
public_configs = [ ":winsdk_samples_config" ]
configs -= [
"//build/config/compiler:chromium_code",
"//build/config/win:nominmax",
]
configs += [
"//build/config/compiler:no_chromium_code",
":winsdk_samples_warnings_config",
]
}
}