mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
[bazel] MVP for building GUI related things with bazel (#7934)
Co-authored-by: David Vo <auscompgeek@users.noreply.github.com>
This commit is contained in:
44
simulation/halsim_ds_socket/BUILD.bazel
Normal file
44
simulation/halsim_ds_socket/BUILD.bazel
Normal file
@@ -0,0 +1,44 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
|
||||
|
||||
cc_library(
|
||||
name = "headers",
|
||||
hdrs = glob(["src/main/native/include/**"]),
|
||||
includes = ["src/main/native/include"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "halsim_ds_socket",
|
||||
srcs = glob(["src/main/native/cpp/**"]),
|
||||
target_compatible_with = select({
|
||||
"@rules_bzlmodrio_toolchains//constraints/is_roborio:roborio": ["@platforms//:incompatible"],
|
||||
"@rules_bzlmodrio_toolchains//constraints/is_systemcore:systemcore": ["@platforms//:incompatible"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":headers",
|
||||
"//hal:wpiHal.static",
|
||||
"//wpinet:wpinet.static",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "halsim_ds_socket-test",
|
||||
size = "small",
|
||||
srcs = glob([
|
||||
"src/test/native/**/*.cpp",
|
||||
"src/test/native/**/*.h",
|
||||
]),
|
||||
deps = [
|
||||
"//simulation/halsim_ds_socket",
|
||||
"//thirdparty/googletest:googletest.static",
|
||||
],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "DevMain-Cpp",
|
||||
srcs = ["src/dev/native/cpp/main.cpp"],
|
||||
deps = [
|
||||
":halsim_ds_socket",
|
||||
],
|
||||
)
|
||||
Reference in New Issue
Block a user