|
1 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
|
2 # |
|
3 # Use of this source code is governed by a BSD-style license |
|
4 # that can be found in the LICENSE file in the root of the source |
|
5 # tree. An additional intellectual property rights grant can be found |
|
6 # in the file PATENTS. All contributing project authors may |
|
7 # be found in the AUTHORS file in the root of the source tree. |
|
8 |
|
9 { |
|
10 'includes': [ 'webrtc/build/common.gypi', ], |
|
11 'variables': { |
|
12 'peerconnection_sample': 'third_party/libjingle/source/talk/examples/peerconnection', |
|
13 }, |
|
14 |
|
15 # for mozilla, we want to force stuff to build but we don't want peerconnection_client or server |
|
16 # for unknown reasons, 'targets' must be outside of conditions. And don't try to build a dummy |
|
17 # executable... |
|
18 'targets': [ |
|
19 { |
|
20 'conditions': [ |
|
21 ['build_with_mozilla==1', { |
|
22 'target_name': 'dummy', |
|
23 'type': 'none', |
|
24 'actions': [ |
|
25 { |
|
26 'action_name': 'dummy', |
|
27 'action': [ |
|
28 'echo ARGHHHHHHHHHHHHHHHHHHHH', |
|
29 ], |
|
30 'inputs': [ |
|
31 'dummy_file.txt', |
|
32 ], |
|
33 'message': 'Generating scream', |
|
34 }, ], |
|
35 'dependencies': [ |
|
36 'webrtc/modules/modules.gyp:audio_device', |
|
37 'webrtc/modules/modules.gyp:video_capture_module', |
|
38 # 'webrtc/modules/modules.gyp:video_render_module', |
|
39 # 'webrtc/system_wrappers/source/system_wrappers.gyp:system_wrappers', |
|
40 'webrtc/video_engine/video_engine.gyp:video_engine_core', |
|
41 'webrtc/voice_engine/voice_engine.gyp:voice_engine', |
|
42 ], |
|
43 }, ], |
|
44 ], |
|
45 }, ], |
|
46 'conditions': [ |
|
47 ['build_with_mozilla==0', { |
|
48 'targets': [ |
|
49 { |
|
50 'target_name': 'peerconnection_server', |
|
51 'type': 'executable', |
|
52 'sources': [ |
|
53 '<(peerconnection_sample)/server/data_socket.cc', |
|
54 '<(peerconnection_sample)/server/data_socket.h', |
|
55 '<(peerconnection_sample)/server/main.cc', |
|
56 '<(peerconnection_sample)/server/peer_channel.cc', |
|
57 '<(peerconnection_sample)/server/peer_channel.h', |
|
58 '<(peerconnection_sample)/server/utils.cc', |
|
59 '<(peerconnection_sample)/server/utils.h', |
|
60 ], |
|
61 'include_dirs': [ |
|
62 'third_party/libjingle/source', |
|
63 ], |
|
64 }, ], |
|
65 'conditions': [ |
|
66 # TODO(wu): Merge the target for different platforms. |
|
67 ['OS=="win"', { |
|
68 'targets': [ |
|
69 { |
|
70 'target_name': 'peerconnection_client', |
|
71 'type': 'executable', |
|
72 'sources': [ |
|
73 '<(peerconnection_sample)/client/conductor.cc', |
|
74 '<(peerconnection_sample)/client/conductor.h', |
|
75 '<(peerconnection_sample)/client/defaults.cc', |
|
76 '<(peerconnection_sample)/client/defaults.h', |
|
77 '<(peerconnection_sample)/client/main.cc', |
|
78 '<(peerconnection_sample)/client/main_wnd.cc', |
|
79 '<(peerconnection_sample)/client/main_wnd.h', |
|
80 '<(peerconnection_sample)/client/peer_connection_client.cc', |
|
81 '<(peerconnection_sample)/client/peer_connection_client.h', |
|
82 'third_party/libjingle/source/talk/base/win32socketinit.cc', |
|
83 'third_party/libjingle/source/talk/base/win32socketserver.cc', |
|
84 ], |
|
85 'msvs_settings': { |
|
86 'VCLinkerTool': { |
|
87 'SubSystem': '2', # Windows |
|
88 }, |
|
89 }, |
|
90 'dependencies': [ |
|
91 'third_party/jsoncpp/jsoncpp.gyp:jsoncpp', |
|
92 'third_party/libjingle/libjingle.gyp:libjingle_peerconnection', |
|
93 ], |
|
94 'include_dirs': [ |
|
95 'src', |
|
96 'webrtc/modules/interface', |
|
97 'third_party/libjingle/source', |
|
98 ], |
|
99 }, |
|
100 ], # targets |
|
101 }, ], # OS="win" |
|
102 ['OS=="linux"', { |
|
103 'targets': [ |
|
104 { |
|
105 'target_name': 'peerconnection_client', |
|
106 'type': 'executable', |
|
107 'sources': [ |
|
108 '<(peerconnection_sample)/client/conductor.cc', |
|
109 '<(peerconnection_sample)/client/conductor.h', |
|
110 '<(peerconnection_sample)/client/defaults.cc', |
|
111 '<(peerconnection_sample)/client/defaults.h', |
|
112 '<(peerconnection_sample)/client/linux/main.cc', |
|
113 '<(peerconnection_sample)/client/linux/main_wnd.cc', |
|
114 '<(peerconnection_sample)/client/linux/main_wnd.h', |
|
115 '<(peerconnection_sample)/client/peer_connection_client.cc', |
|
116 '<(peerconnection_sample)/client/peer_connection_client.h', |
|
117 ], |
|
118 'dependencies': [ |
|
119 'third_party/jsoncpp/jsoncpp.gyp:jsoncpp', |
|
120 'third_party/libjingle/libjingle.gyp:libjingle_peerconnection', |
|
121 # TODO(tommi): Switch to this and remove specific gtk dependency |
|
122 # sections below for cflags and link_settings. |
|
123 # '<(DEPTH)/build/linux/system.gyp:gtk', |
|
124 ], |
|
125 'include_dirs': [ |
|
126 'third_party/libjingle/source', |
|
127 ], |
|
128 'cflags': [ |
|
129 '<!@(pkg-config --cflags gtk+-2.0)', |
|
130 ], |
|
131 'link_settings': { |
|
132 'ldflags': [ |
|
133 '<!@(pkg-config --libs-only-L --libs-only-other gtk+-2.0 gthread-2.0)', |
|
134 ], |
|
135 'libraries': [ |
|
136 '<!@(pkg-config --libs-only-l gtk+-2.0 gthread-2.0)', |
|
137 '-lX11', |
|
138 '-lXcomposite', |
|
139 '-lXext', |
|
140 '-lXrender', |
|
141 ], |
|
142 }, |
|
143 }, |
|
144 ], # targets |
|
145 }, ], # OS="linux" |
|
146 # There's no peerconnection_client implementation for Mac. |
|
147 # But add this dummy peerconnection_client target so that the runhooks |
|
148 # won't complain. |
|
149 ['OS=="mac"', { |
|
150 'targets': [ |
|
151 { |
|
152 'target_name': 'peerconnection_client', |
|
153 'type': 'none', |
|
154 }, |
|
155 ], |
|
156 }, ], |
|
157 ], |
|
158 }, ], |
|
159 ], |
|
160 |
|
161 } |