mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
updated BUILD files and MODULE.bazel for bazel 9
This commit is contained in:
+10
-5
@@ -118,28 +118,33 @@ filegroup(
|
||||
)
|
||||
|
||||
# Create a repo that exposes system-installed sdbus-c++ and libsystemd to Bazel.
|
||||
#
|
||||
# Important portability note:
|
||||
# Avoid hardcoding distro-specific library directories (for example
|
||||
# /usr/lib/x86_64-linux-gnu vs /usr/lib64). Instead, link by soname and let the
|
||||
# system linker/search path resolve the actual shared object location.
|
||||
new_local_repository = use_repo_rule(
|
||||
"@bazel_tools//tools/build_defs/repo:local.bzl",
|
||||
"new_local_repository",
|
||||
)
|
||||
|
||||
# Fedora/RHEL layout (lib64); see Ubuntu/Debian variant below
|
||||
new_local_repository(
|
||||
name = "sdbus_cpp",
|
||||
path = "/usr",
|
||||
build_file_content = """
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
cc_import(
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
cc_library(
|
||||
name = "sdbus_cpp",
|
||||
shared_library = "lib/x86_64-linux-gnu/libsdbus-c++.so",
|
||||
hdrs = glob(["include/sdbus-c++/**/*.h*"]),
|
||||
includes = ["include"],
|
||||
linkopts = ["-lsdbus-c++"],
|
||||
)
|
||||
|
||||
cc_import(
|
||||
cc_library(
|
||||
name = "libsystemd",
|
||||
shared_library = "lib/x86_64-linux-gnu/libsystemd.so",
|
||||
linkopts = ["-lsystemd"],
|
||||
)
|
||||
""",
|
||||
)
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
load("@rules_cc//cc:defs.bzl", "cc_binary")
|
||||
|
||||
cc_binary(
|
||||
name = "file_share",
|
||||
srcs = ["main.cc"],
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
|
||||
#refresh_compile_commands(
|
||||
# name = "refresh_compile_commands",
|
||||
#
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
# limitations under the License.
|
||||
licenses(["notice"])
|
||||
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
cc_library(
|
||||
name = "types",
|
||||
textual_hdrs = glob(["**/*.h"]),
|
||||
|
||||
@@ -13,6 +13,30 @@
|
||||
# limitations under the License.
|
||||
|
||||
licenses(["notice"])
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_binary")
|
||||
|
||||
cc_library(
|
||||
name = "nearby_connections_service_linux",
|
||||
srcs = ["nearby_connections_service_linux.cc"],
|
||||
hdrs = [
|
||||
"nearby_connections_service_linux.h",
|
||||
"//sharing:nearby_connections_service.h",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//connections:core",
|
||||
"//connections:core_types",
|
||||
"//internal/base:file_path",
|
||||
"//internal/platform:base",
|
||||
"//internal/platform:logging",
|
||||
"//internal/platform:mac_address",
|
||||
"//sharing:connection_types",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
"@com_google_absl//absl/strings:string_view",
|
||||
"@com_google_absl//absl/time",
|
||||
"@com_google_absl//absl/types:span",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "nearby_sharing_service_linux",
|
||||
|
||||
Reference in New Issue
Block a user