Skip to content

Commit

Permalink
Release Build: Installation ready for drivers/camera and the Monitor …
Browse files Browse the repository at this point in the history
…module
  • Loading branch information
storypku committed Jan 28, 2021
1 parent c60fcf8 commit 08c147b
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 8 deletions.
4 changes: 2 additions & 2 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ install(
deps = [
"//cyber:install",
"//cyber/examples:install",
"//modules/drivers:install",
"//modules/monitor:install",
"//scripts:install",
# "//modules/control:install",
# "//modules/drivers:install",
],
)
12 changes: 12 additions & 0 deletions modules/drivers/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("//tools/install:install.bzl", "install")

package(
default_visibility = ["//visibility:public"],
)

install(
name = "install",
deps = [
"//modules/drivers/camera:install",
],
)
23 changes: 23 additions & 0 deletions modules/drivers/camera/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("//tools/install:install.bzl", "install")
load("//tools:cpplint.bzl", "cpplint")
load("//tools/platform:build_defs.bzl", "if_x86_64")

Expand All @@ -22,6 +23,28 @@ cc_binary(
],
)

filegroup(
name = "runtime_data",
srcs = glob([
"conf/*.txt",
"dag/*.dag",
"launch/*.launch",
]),
)

install(
name = "install",
data = [
":runtime_data",
],
targets = [
":libcamera_component.so",
],
deps = [
"//cyber:install",
],
)

cc_library(
name = "camera_component_lib",
srcs = ["camera_component.cc"],
Expand Down
37 changes: 31 additions & 6 deletions modules/monitor/BUILD
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("//tools/install:install.bzl", "install")
load("//tools:cpplint.bzl", "cpplint")

package(default_visibility = ["//visibility:public"])

MONITOR_COPTS = ['-DMODULE_NAME=\\"monitor\\"']

cc_binary(
name = "libmonitor.so",
linkshared = True,
linkstatic = False,
deps = [
":monitor_lib",
],
)

cc_library(
name = "monitor_lib",
srcs = ["monitor.cc"],
hdrs = ["monitor.h"],
copts = ['-DMODULE_NAME=\\"monitor\\"'],
copts = MONITOR_COPTS,
visibility = ["//visibility:private"],
deps = [
"//cyber",
"//modules/common/util:message_util",
Expand All @@ -28,12 +41,24 @@ cc_library(
],
)

cc_binary(
name = "libmonitor.so",
linkshared = True,
linkstatic = False,
filegroup(
name = "runtime_data",
srcs = glob([
"dag/*.dag",
"launch/*.launch",
]),
)

install(
name = "install",
targets = [
":libmonitor.so",
],
data = [
":runtime_data",
],
deps = [
":monitor_lib",
"//cyber:install",
],
)

Expand Down

0 comments on commit 08c147b

Please sign in to comment.