mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[bazel] Build processstarter with bazel too (#8143)
This commit is contained in:
@@ -65,6 +65,7 @@ publish_all(
|
||||
"//datalog:datalog-java_publish",
|
||||
"//datalogtool:datalogtool_publish",
|
||||
"//epilogue-processor:processor-java_publish",
|
||||
"//processstarter:processstarter_publish",
|
||||
"//epilogue-runtime:epilogue-java_publish",
|
||||
"//fieldImages:fieldImages-cpp_publish",
|
||||
"//fieldImages:fieldImages-java_publish",
|
||||
|
||||
54
processstarter/BUILD.bazel
Normal file
54
processstarter/BUILD.bazel
Normal file
@@ -0,0 +1,54 @@
|
||||
load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
|
||||
load("//shared/bazel/rules:objectivec_rules.bzl", "wpilib_objc_library")
|
||||
load("//shared/bazel/rules:packaging.bzl", "package_binary_cc_project")
|
||||
|
||||
WIN_SRCS = glob([
|
||||
"src/main/native/windows/**/*.cpp",
|
||||
"src/main/native/windows/**/*.h",
|
||||
])
|
||||
|
||||
LINUX_SRCS = glob([
|
||||
"src/main/native/linux/**/*.cpp",
|
||||
"src/main/native/linux/**/*.h",
|
||||
])
|
||||
|
||||
MAC_SRCS = glob([
|
||||
"src/main/native/osx/**/*.mm",
|
||||
"src/main/native/osx/**/*.h",
|
||||
])
|
||||
|
||||
filegroup(
|
||||
name = "native-srcs",
|
||||
srcs = select({
|
||||
"@platforms//os:osx": MAC_SRCS,
|
||||
"@platforms//os:windows": WIN_SRCS,
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_linux": LINUX_SRCS,
|
||||
}),
|
||||
)
|
||||
|
||||
wpilib_objc_library(
|
||||
name = "processstarter-osx",
|
||||
srcs = [":native-srcs"],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "processstarter",
|
||||
srcs = select({
|
||||
"@platforms//os:osx": [],
|
||||
"//conditions:default": [":native-srcs"],
|
||||
}),
|
||||
linkopts = select({
|
||||
"@platforms//os:windows": ["-SUBSYSTEM:WINDOWS"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
deps = select({
|
||||
"@platforms//os:osx": ["processstarter-osx"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
)
|
||||
|
||||
package_binary_cc_project(
|
||||
name = "processstarter",
|
||||
maven_artifact_name = "processstarter",
|
||||
maven_group_id = "edu.wpi.first.tools",
|
||||
)
|
||||
Reference in New Issue
Block a user