Split aprilrobotics into a library
This will allow the mapping class to instantiate a
AprilRoboticsDetector with the log reader event loop.
Also made this code compatible with x86.
Signed-off-by: milind-u <milind.upadhyay@gmail.com>
Change-Id: Ie05bc947710fa1a456fd08db1e1d40ffb9f71119
diff --git a/y2023/vision/BUILD b/y2023/vision/BUILD
index 25ae2b9..55390e4 100644
--- a/y2023/vision/BUILD
+++ b/y2023/vision/BUILD
@@ -98,8 +98,8 @@
],
)
-cc_binary(
- name = "aprilrobotics",
+cc_library(
+ name = "aprilrobotics_lib",
srcs = [
"aprilrobotics.cc",
"aprilrobotics.h",
@@ -119,3 +119,17 @@
"//third_party/apriltag",
],
)
+
+cc_binary(
+ name = "aprilrobotics",
+ srcs = [
+ "aprilrobotics_main.cc",
+ ],
+ target_compatible_with = ["@platforms//os:linux"],
+ visibility = ["//y2023:__subpackages__"],
+ deps = [
+ ":aprilrobotics_lib",
+ "//aos:init",
+ "//aos/events:shm_event_loop",
+ ],
+)