mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
[bazel] Clean up bazel scripts (#7984)
This commit is contained in:
57
datalogtool/BUILD.bazel
Normal file
57
datalogtool/BUILD.bazel
Normal file
@@ -0,0 +1,57 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_binary")
|
||||
load("//shared/bazel/rules/gen:gen-resources.bzl", "generate_resources")
|
||||
load("//shared/bazel/rules/gen:gen-version-file.bzl", "generate_version_file")
|
||||
|
||||
generate_resources(
|
||||
name = "generate-resources",
|
||||
namespace = "dlt",
|
||||
prefix = "DLT",
|
||||
resource_files = glob(["src/main/native/resources/*"]),
|
||||
)
|
||||
|
||||
generate_version_file(
|
||||
name = "generate-version",
|
||||
output_file = "WPILibVersion.cpp",
|
||||
template = "src/main/generate/WPILibVersion.cpp.in",
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "datalogtool",
|
||||
srcs = glob(["src/main/native/cpp/*"]) + [
|
||||
":generate-resources",
|
||||
":generate-version",
|
||||
],
|
||||
defines = ["LIBSSH_STATIC"],
|
||||
linkopts = select({
|
||||
"@bazel_tools//src/conditions:darwin": [
|
||||
"-framework",
|
||||
"Kerberos",
|
||||
],
|
||||
"@bazel_tools//src/conditions:linux_x86_64": [],
|
||||
"@bazel_tools//src/conditions:windows": [
|
||||
"-DEFAULTLIB:Gdi32.lib",
|
||||
"-DEFAULTLIB:Shell32.lib",
|
||||
"-DEFAULTLIB:d3d11.lib",
|
||||
"-DEFAULTLIB:d3dcompiler.lib",
|
||||
"-DEFAULTLIB:ws2_32.lib",
|
||||
"-DEFAULTLIB:advapi32.lib",
|
||||
"-DEFAULTLIB:crypt32.lib",
|
||||
"-DEFAULTLIB:user32.lib",
|
||||
"-SUBSYSTEM:WINDOWS",
|
||||
],
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_cross_compiler": [],
|
||||
}),
|
||||
tags = [
|
||||
"no-roborio",
|
||||
"wpi-cpp-gui",
|
||||
],
|
||||
target_compatible_with = select({
|
||||
"@rules_bzlmodrio_toolchains//constraints/is_systemcore:systemcore": ["@platforms//:incompatible"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
deps = [
|
||||
"//datalog:datalog.static",
|
||||
"//glass:libglass",
|
||||
"@bzlmodrio-libssh//libraries/cpp/libssh",
|
||||
],
|
||||
)
|
||||
Reference in New Issue
Block a user