1# Copyright 2014 The Chroium Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5{ 6 'includes': [ 7 'mojo_public.gypi', 8 ], 9 'variables': { 10 'chromium_code': 1, 11 }, 12 'target_defaults' : { 13 'include_dirs': [ 14 '..', 15 ], 16 }, 17 'targets': [ 18 { 19 'target_name': 'mojo_public', 20 'type': 'none', 21 'dependencies': [ 22 'mojo_js_bindings', 23 'mojo_public_system', 24 ], 25 }, 26 { 27 # GN version: //mojo/public/c/system 28 'target_name': 'mojo_public_system', 29 'type': '<(component)', 30 'sources': [ 31 '<@(mojo_public_system_sources)', 32 ], 33 'defines': [ 34 'MOJO_SYSTEM_IMPLEMENTATION', 35 ], 36 }, 37 { 38 # GN version: //mojo/public/cpp/system 39 'target_name': 'mojo_cpp_system', 40 'type': 'static_library', 41 'sources': [ 42 '<@(mojo_cpp_system_sources)', 43 ], 44 'dependencies': [ 45 '../base/base.gyp:base', 46 'mojo_public_system', 47 ], 48 }, 49 { 50 # GN version: //mojo/public/cpp/bindings 51 'target_name': 'mojo_cpp_bindings', 52 'type': 'static_library', 53 'include_dirs': [ 54 '..' 55 ], 56 'sources': [ 57 '<@(mojo_cpp_bindings_sources)', 58 59 # This comes from the mojo_interface_bindings_cpp_sources dependency. 60 '>@(mojom_generated_sources)', 61 ], 62 'dependencies': [ 63 '../base/base.gyp:base', 64 'mojo_cpp_system', 65 'mojo_interface_bindings_cpp_sources', 66 ], 67 }, 68 { 69 # GN version: //mojo/message_pump 70 'target_name': 'mojo_message_pump_lib', 71 'type': '<(component)', 72 'defines': [ 73 'MOJO_MESSAGE_PUMP_IMPLEMENTATION', 74 ], 75 'dependencies': [ 76 '../base/base.gyp:base', 77 'mojo_cpp_system', 78 ], 79 'sources': [ 80 'message_pump/handle_watcher.cc', 81 'message_pump/handle_watcher.h', 82 'message_pump/message_pump_mojo.cc', 83 'message_pump/message_pump_mojo.h', 84 'message_pump/message_pump_mojo_handler.h', 85 'message_pump/time_helper.cc', 86 'message_pump/time_helper.h', 87 ], 88 }, 89 { 90 # GN version: //mojo/public/js 91 'target_name': 'mojo_js_bindings', 92 'type': 'static_library', 93 'include_dirs': [ 94 '..' 95 ], 96 'sources': [ 97 'public/js/constants.cc', 98 'public/js/constants.h', 99 ], 100 }, 101 { 102 'target_name': 'mojo_interface_bindings_mojom', 103 'type': 'none', 104 'variables': { 105 'require_interface_bindings': 0, 106 'mojom_files': [ 107 'public/interfaces/bindings/interface_control_messages.mojom', 108 'public/interfaces/bindings/pipe_control_messages.mojom', 109 ], 110 }, 111 'includes': [ 'mojom_bindings_generator_explicit.gypi' ], 112 }, 113 { 114 'target_name': 'mojo_interface_bindings_cpp_sources', 115 'type': 'none', 116 'dependencies': [ 117 'mojo_interface_bindings_mojom', 118 ], 119 }, 120 { 121 # This target can be used to introduce a dependency on interface bindings 122 # generation without introducing any side-effects in the dependent 123 # target's configuration. 124 'target_name': 'mojo_interface_bindings_generation', 125 'type': 'none', 126 'dependencies': [ 127 'mojo_interface_bindings_cpp_sources', 128 ], 129 }, 130 { 131 # GN version: //mojo/public/c/test_support 132 'target_name': 'mojo_public_test_support', 133 'type': 'static_library', 134 'include_dirs': [ 135 '..', 136 ], 137 'direct_dependent_settings': { 138 'include_dirs': [ 139 '..', 140 ], 141 }, 142 'sources': [ 143 'public/c/test_support/test_support.h', 144 # TODO(vtl): Convert this to thunks http://crbug.com/386799 145 'public/tests/test_support_private.cc', 146 'public/tests/test_support_private.h', 147 ], 148 }, 149 { 150 # GN version: //mojo/public/cpp/test_support:test_utils 151 'target_name': 'mojo_public_test_utils', 152 'type': 'static_library', 153 'dependencies': [ 154 '../base/base.gyp:base', 155 '../testing/gtest.gyp:gtest', 156 'mojo_public_test_support', 157 ], 158 'sources': [ 159 'public/cpp/test_support/lib/test_support.cc', 160 'public/cpp/test_support/lib/test_utils.cc', 161 'public/cpp/test_support/test_utils.h', 162 ], 163 }, 164 { 165 # GN version: //mojo/public/cpp/bindings/tests:mojo_public_bindings_test_utils 166 'target_name': 'mojo_public_bindings_test_utils', 167 'type': 'static_library', 168 'dependencies': [ 169 '../base/base.gyp:base', 170 ], 171 'sources': [ 172 'public/cpp/bindings/tests/validation_test_input_parser.cc', 173 'public/cpp/bindings/tests/validation_test_input_parser.h', 174 ], 175 }, 176 ], 177 'conditions': [ 178 ['OS == "android"', { 179 'targets': [ 180 { 181 # GN version: //mojo/public/java:system 182 'target_name': 'mojo_public_java', 183 'type': 'none', 184 'variables': { 185 'chromium_code': 0, 186 'java_in_dir': 'public/java/system', 187 }, 188 'includes': [ '../build/java.gypi' ], 189 }, 190 { 191 'target_name': 'mojo_interface_bindings_java_sources', 192 'type': 'none', 193 'dependencies': [ 194 'mojo_interface_bindings_mojom', 195 ], 196 }, 197 { 198 # GN version: //mojo/public/java:bindings 199 'target_name': 'mojo_bindings_java', 200 'type': 'none', 201 'variables': { 202 'chromium_code': 0, 203 'java_in_dir': 'public/java/bindings', 204 }, 205 'dependencies': [ 206 'mojo_interface_bindings_java_sources', 207 'mojo_public_java', 208 '<(DEPTH)/base/base.gyp:base_java', 209 ], 210 'includes': [ '../build/java.gypi' ], 211 }, 212 ], 213 }], 214 ['OS != "ios"', { 215 'targets': [ 216 { 217 # TODO(yzshen): crbug.com/617718 Consider moving this into blink. 218 # GN version: //mojo/public/cpp/bindings:wtf_support 219 'target_name': 'mojo_cpp_bindings_wtf_support', 220 'type': 'static_library', 221 'include_dirs': [ 222 '..' 223 ], 224 'sources': [ 225 'public/cpp/bindings/array_traits_wtf.h', 226 'public/cpp/bindings/array_traits_wtf_vector.h', 227 'public/cpp/bindings/lib/string_traits_wtf.cc', 228 'public/cpp/bindings/lib/wtf_clone_equals_util.h', 229 'public/cpp/bindings/lib/wtf_serialization.h', 230 'public/cpp/bindings/map_traits_wtf.h', 231 'public/cpp/bindings/map_traits_wtf_hash_map.h', 232 'public/cpp/bindings/string_traits_wtf.h', 233 'public/cpp/bindings/wtf_array.h', 234 'public/cpp/bindings/wtf_map.h', 235 ], 236 'dependencies': [ 237 'mojo_cpp_bindings', 238 '../third_party/WebKit/Source/config.gyp:config', 239 '../third_party/WebKit/Source/wtf/wtf.gyp:wtf', 240 ], 241 'export_dependent_settings': [ 242 'mojo_cpp_bindings', 243 '../third_party/WebKit/Source/config.gyp:config', 244 ], 245 }, 246 ], 247 }], 248 ['OS == "win" and target_arch=="ia32"', { 249 'targets': [ 250 { 251 # GN version: //mojo/public/c/system 252 'target_name': 'mojo_public_system_win64', 253 'type': '<(component)', 254 'sources': [ 255 '<@(mojo_public_system_sources)', 256 ], 257 'defines': [ 258 'MOJO_SYSTEM_IMPLEMENTATION', 259 ], 260 'configurations': { 261 'Common_Base': { 262 'msvs_target_platform': 'x64', 263 }, 264 }, 265 }, 266 { 267 # GN version: //mojo/public/cpp/system 268 'target_name': 'mojo_cpp_system_win64', 269 'type': 'static_library', 270 'sources': [ 271 '<@(mojo_cpp_system_sources)', 272 ], 273 'dependencies': [ 274 '../base/base.gyp:base_win64', 275 'mojo_public_system_win64', 276 ], 277 'configurations': { 278 'Common_Base': { 279 'msvs_target_platform': 'x64', 280 }, 281 }, 282 }, 283 { 284 # GN version: //mojo/public/cpp/bindings 285 'target_name': 'mojo_cpp_bindings_win64', 286 'type': 'static_library', 287 'include_dirs': [ 288 '..' 289 ], 290 'sources': [ 291 '<@(mojo_cpp_bindings_sources)', 292 293 # This comes from the mojo_interface_bindings_cpp_sources dependency. 294 '>@(mojom_generated_sources)', 295 ], 296 'dependencies': [ 297 '../base/base.gyp:base_win64', 298 'mojo_cpp_system_win64', 299 'mojo_interface_bindings_cpp_sources', 300 ], 301 'configurations': { 302 'Common_Base': { 303 'msvs_target_platform': 'x64', 304 }, 305 }, 306 }, 307 ], 308 }], 309 ], 310} 311