Index: mojo/public/cpp/bindings/BUILD.gn |
diff --git a/mojo/public/cpp/bindings/BUILD.gn b/mojo/public/cpp/bindings/BUILD.gn |
index 9b9135003603a960fd35eff596cd0a632e74cd91..4d311d5363fc2592951c6d7a75c8be05932c9bda 100644 |
--- a/mojo/public/cpp/bindings/BUILD.gn |
+++ b/mojo/public/cpp/bindings/BUILD.gn |
@@ -2,8 +2,25 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
-static_library("bindings") { |
+interfaces_bindings_gen_dir = "$root_gen_dir/mojo/public/interfaces/bindings" |
+ |
+component("bindings") { |
sources = [ |
+ # Normally, targets should depend on the source_sets generated by mojom |
+ # targets. However, the generated source_sets use portions of the bindings |
+ # library. In order to avoid linker warnings about locally-defined imports |
+ # in Windows components build, this target depends on the generated .cc |
yzshen1
2016/09/22 22:31:15
nit: please consider changing ".cc" to "C++", beca
dcheng
2016/09/24 01:06:44
Done.
|
+ # files directly so that the EXPORT macro defintions match. |
+ "$interfaces_bindings_gen_dir/interface_control_messages.mojom-shared-internal.h", |
+ "$interfaces_bindings_gen_dir/interface_control_messages.mojom-shared.cc", |
+ "$interfaces_bindings_gen_dir/interface_control_messages.mojom-shared.h", |
+ "$interfaces_bindings_gen_dir/interface_control_messages.mojom.cc", |
+ "$interfaces_bindings_gen_dir/interface_control_messages.mojom.h", |
+ "$interfaces_bindings_gen_dir/pipe_control_messages.mojom-shared-internal.h", |
+ "$interfaces_bindings_gen_dir/pipe_control_messages.mojom-shared.cc", |
+ "$interfaces_bindings_gen_dir/pipe_control_messages.mojom-shared.h", |
+ "$interfaces_bindings_gen_dir/pipe_control_messages.mojom.cc", |
+ "$interfaces_bindings_gen_dir/pipe_control_messages.mojom.h", |
"array.h", |
"array_data_view.h", |
"array_traits.h", |
@@ -19,6 +36,7 @@ static_library("bindings") { |
"associated_interface_request.h", |
"binding.h", |
"binding_set.h", |
+ "bindings_export.h", |
"connection_error_callback.h", |
"connector.h", |
"enum_traits.h", |
@@ -138,8 +156,11 @@ static_library("bindings") { |
deps = [ |
"//base", |
- "//mojo/public/interfaces/bindings:bindings_cpp_sources", |
+ "//mojo/public/interfaces/bindings:bindings__generator", |
+ "//mojo/public/interfaces/bindings:bindings_shared__generator", |
] |
+ |
+ defines = [ "MOJO_CPP_BINDINGS_IMPLEMENTATION" ] |
} |
source_set("struct_traits") { |