You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
1.9 KiB
71 lines
1.9 KiB
#
|
|
# Copyright 2020 Google
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at:
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
|
|
import("//common-mk/cxxbridge.gni")
|
|
|
|
config("rust_shim_config") {
|
|
include_dirs = [ "//bt/gd/rust/shim" ]
|
|
}
|
|
|
|
cxxbridge_header("shim_bridge_header") {
|
|
sources = [ "src/bridge.rs" ]
|
|
all_dependent_configs = [ ":rust_shim_config" ]
|
|
deps = [ ":cxxlibheader" ]
|
|
}
|
|
|
|
cxxbridge_cc("shim_bridge_code") {
|
|
sources = [ "src/bridge.rs" ]
|
|
deps = [ ":shim_bridge_header" ]
|
|
configs = [ "//bt/gd:gd_defaults" ]
|
|
}
|
|
|
|
cxxbridge_header("init_flags_bridge_header") {
|
|
sources = [ "src/init_flags.rs" ]
|
|
all_dependent_configs = [ ":rust_shim_config" ]
|
|
deps = [ ":cxxlibheader" ]
|
|
}
|
|
|
|
cxxbridge_cc("init_flags_bridge_code") {
|
|
sources = [ "src/init_flags.rs" ]
|
|
deps = [ ":init_flags_bridge_header" ]
|
|
configs = [ "//bt/gd:gd_defaults" ]
|
|
}
|
|
|
|
cxxbridge_header("message_loop_thread_bridge_header") {
|
|
sources = [ "src/message_loop_thread.rs" ]
|
|
all_dependent_configs = [ ":rust_shim_config" ]
|
|
deps = [ ":cxxlibheader" ]
|
|
}
|
|
|
|
cxxbridge_cc("message_loop_thread_bridge_code") {
|
|
sources = [ "src/message_loop_thread.rs" ]
|
|
deps = [ ":message_loop_thread_bridge_header" ]
|
|
configs = [ "//bt/gd:gd_defaults" ]
|
|
}
|
|
|
|
cxxbridge_libheader("cxxlibheader") {
|
|
deps = []
|
|
}
|
|
|
|
static_library("libbluetooth_rust_interop") {
|
|
deps = [
|
|
":cxxlibheader",
|
|
":init_flags_bridge_code",
|
|
":message_loop_thread_bridge_code",
|
|
":shim_bridge_code",
|
|
]
|
|
}
|