mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[bazel] Implement cscore shared libraries (#8089)
Use all our fancy new linking code to link cscore properly. nm reports that the symbols look quite good. Signed-off-by: Austin Schuh <austin.linux@gmail.com> Co-authored-by: PJ Reiniger <pj.reiniger@gmail.com> Co-authored-by: David Vo <auscompgeek@users.noreply.github.com>
This commit is contained in:
@@ -25,7 +25,7 @@ compile_pip_requirements(
|
||||
alias(
|
||||
name = "quickbuf_protoc",
|
||||
actual = select({
|
||||
"@bazel_tools//src/conditions:windows": "@quickbuffer_protoc_windows//file",
|
||||
"@platforms//os:windows": "@quickbuffer_protoc_windows//file",
|
||||
"@rules_bzlmodrio_toolchains//conditions:osx_aarch64": "@quickbuffer_protoc_osx_aarch64//file",
|
||||
"@rules_bzlmodrio_toolchains//conditions:osx_x86_64": "@quickbuffer_protoc_osx_x86-64//file",
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_linux": "@quickbuffer_protoc_linux//file",
|
||||
|
||||
@@ -19,14 +19,14 @@ cc_library(
|
||||
srcs = glob(["src/main/native/thirdparty/apriltag/src/**"]),
|
||||
hdrs = glob(["src/main/native/thirdparty/apriltag/include/**"]),
|
||||
copts = select({
|
||||
"@bazel_tools//src/conditions:darwin": [
|
||||
"@platforms//os:osx": [
|
||||
"-Wno-format-nonliteral",
|
||||
"-Wno-gnu-zero-variadic-macro-arguments",
|
||||
"-Wno-uninitialized",
|
||||
"-Wno-sign-compare",
|
||||
"-Wno-type-limits",
|
||||
],
|
||||
"@bazel_tools//src/conditions:windows": [
|
||||
"@platforms//os:windows": [
|
||||
"/wd4005",
|
||||
"/wd4018",
|
||||
"/wd4244",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
load("@bzlmodrio-opencv//libraries/cpp/opencv:libraries.bzl", "opencv_shared_libraries")
|
||||
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_test")
|
||||
load("@rules_java//java:defs.bzl", "java_binary")
|
||||
load("//shared/bazel/rules:cc_rules.bzl", "wpilib_cc_library", "wpilib_cc_static_library")
|
||||
load("//shared/bazel/rules:cc_rules.bzl", "wpilib_cc_library", "wpilib_cc_shared_library", "wpilib_cc_static_library")
|
||||
load("//shared/bazel/rules:java_rules.bzl", "wpilib_java_library")
|
||||
load("//shared/bazel/rules:packaging.bzl", "package_minimal_cc_project")
|
||||
|
||||
@@ -20,6 +21,17 @@ wpilib_cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
wpilib_cc_shared_library(
|
||||
name = "shared/cameraserver",
|
||||
dynamic_deps = [
|
||||
"//cscore:shared/cscore",
|
||||
"//ntcore:shared/ntcore",
|
||||
"//wpiutil:shared/wpiutil",
|
||||
] + opencv_shared_libraries,
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [":cameraserver"],
|
||||
)
|
||||
|
||||
wpilib_cc_static_library(
|
||||
name = "static/cameraserver",
|
||||
static_deps = [
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
load("@bzlmodrio-opencv//libraries/cpp/opencv:libraries.bzl", "opencv_shared_libraries")
|
||||
load("@rules_cc//cc:cc_shared_library.bzl", "cc_shared_library")
|
||||
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_test")
|
||||
load("@rules_java//java:defs.bzl", "java_binary")
|
||||
load("//shared/bazel/rules:cc_rules.bzl", "wpilib_cc_library", "wpilib_cc_static_library")
|
||||
load("//shared/bazel/rules:cc_rules.bzl", "wpilib_cc_library", "wpilib_cc_shared_library", "wpilib_cc_static_library")
|
||||
load("//shared/bazel/rules:java_rules.bzl", "wpilib_java_junit5_test")
|
||||
load("//shared/bazel/rules:jni_rules.bzl", "wpilib_jni_cc_library", "wpilib_jni_java_library")
|
||||
load("//shared/bazel/rules:objectivec_rules.bzl", "wpilib_objc_library")
|
||||
@@ -21,8 +23,8 @@ MAC_SRCS = glob(["src/main/native/osx/**/*.cpp"])
|
||||
filegroup(
|
||||
name = "native-srcs",
|
||||
srcs = select({
|
||||
"@bazel_tools//src/conditions:darwin": MAC_SRCS,
|
||||
"@bazel_tools//src/conditions:windows": WIN_SRCS,
|
||||
"@platforms//os:osx": MAC_SRCS,
|
||||
"@platforms//os:windows": WIN_SRCS,
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_linux": LINUX_SRCS,
|
||||
}),
|
||||
)
|
||||
@@ -79,11 +81,56 @@ wpilib_cc_library(
|
||||
"//wpiutil",
|
||||
"@bzlmodrio-opencv//libraries/cpp/opencv",
|
||||
] + select({
|
||||
"@bazel_tools//src/conditions:darwin": [":cscore-mac"],
|
||||
"@platforms//os:osx": [":cscore-mac"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
)
|
||||
|
||||
sdk_framework_flags = [
|
||||
"-framework",
|
||||
"Metal",
|
||||
"-framework",
|
||||
"MetalKit",
|
||||
"-framework",
|
||||
"Cocoa",
|
||||
"-framework",
|
||||
"IOKit",
|
||||
"-framework",
|
||||
"CoreFoundation",
|
||||
"-framework",
|
||||
"AVFoundation",
|
||||
"-framework",
|
||||
"Foundation",
|
||||
"-framework",
|
||||
"CoreMedia",
|
||||
"-framework",
|
||||
"CoreVideo",
|
||||
"-framework",
|
||||
"QuartzCore",
|
||||
]
|
||||
|
||||
wpilib_cc_shared_library(
|
||||
name = "shared/cscore",
|
||||
additional_linker_inputs = select({
|
||||
"@platforms//os:osx": [":cscore-mac"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
dynamic_deps = [
|
||||
"//wpinet:shared/wpinet",
|
||||
"//wpiutil:shared/wpiutil",
|
||||
] + opencv_shared_libraries,
|
||||
user_link_flags = select({
|
||||
"@platforms//os:osx": [
|
||||
"-Wl,-force_load,$(location :cscore-mac)",
|
||||
] + sdk_framework_flags,
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":cscore",
|
||||
],
|
||||
)
|
||||
|
||||
wpilib_cc_static_library(
|
||||
name = "static/cscore",
|
||||
static_deps = [
|
||||
@@ -104,6 +151,53 @@ wpilib_jni_cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
wpilib_cc_shared_library(
|
||||
name = "shared/cscorejni",
|
||||
dynamic_deps = [
|
||||
":shared/cscore",
|
||||
"//wpiutil:shared/wpiutil",
|
||||
],
|
||||
use_debug_name = False,
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [":cscorejni"],
|
||||
)
|
||||
|
||||
cc_shared_library(
|
||||
name = "shared/cscorejnicvstatic",
|
||||
additional_linker_inputs = select({
|
||||
"@platforms//os:osx": [":cscore-mac"],
|
||||
"//conditions:default": [],
|
||||
}) + [
|
||||
":src/main/native/LinuxSymbolScript.txt",
|
||||
":src/main/native/MacSymbolScript.txt",
|
||||
],
|
||||
dynamic_deps = [
|
||||
"//wpinet:shared/wpinet",
|
||||
"//wpiutil:shared/wpiutil",
|
||||
] + opencv_shared_libraries,
|
||||
user_link_flags = select({
|
||||
"@platforms//os:osx": [
|
||||
"-Wl,-install_name,libcscorejnicvstatic.so",
|
||||
"-exported_symbols_list",
|
||||
"$(location :src/main/native/MacSymbolScript.txt)",
|
||||
],
|
||||
"//conditions:default": [
|
||||
"-Wl,-soname,libcscorejnicvstatic.so",
|
||||
"-Wl,--version-script=$(location :src/main/native/LinuxSymbolScript.txt)",
|
||||
],
|
||||
}) + select({
|
||||
"@platforms//os:osx": [
|
||||
"-Wl,-force_load,$(location :cscore-mac)",
|
||||
] + sdk_framework_flags,
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":cscore",
|
||||
":cscorejni",
|
||||
],
|
||||
)
|
||||
|
||||
wpilib_jni_java_library(
|
||||
name = "cscore-java",
|
||||
srcs = glob(["src/main/java/**/*.java"]),
|
||||
@@ -165,6 +259,7 @@ java_binary(
|
||||
deps = [
|
||||
"//cscore",
|
||||
"//wpigui",
|
||||
"@bzlmodrio-opencv//libraries/cpp/opencv",
|
||||
],
|
||||
) for example in [
|
||||
"enum_usb",
|
||||
|
||||
@@ -23,12 +23,11 @@ cc_binary(
|
||||
],
|
||||
defines = ["LIBSSH_STATIC"],
|
||||
linkopts = select({
|
||||
"@bazel_tools//src/conditions:darwin": [
|
||||
"@platforms//os:osx": [
|
||||
"-framework",
|
||||
"Kerberos",
|
||||
],
|
||||
"@bazel_tools//src/conditions:linux_x86_64": [],
|
||||
"@bazel_tools//src/conditions:windows": [
|
||||
"@platforms//os:windows": [
|
||||
"-DEFAULTLIB:Gdi32.lib",
|
||||
"-DEFAULTLIB:Shell32.lib",
|
||||
"-DEFAULTLIB:d3d11.lib",
|
||||
@@ -39,6 +38,7 @@ cc_binary(
|
||||
"-DEFAULTLIB:user32.lib",
|
||||
"-SUBSYSTEM:WINDOWS",
|
||||
],
|
||||
"@rules_bzlmodrio_toolchains//conditions:linux_x86_64": [],
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_cross_compiler": [],
|
||||
}),
|
||||
tags = [
|
||||
|
||||
@@ -23,7 +23,7 @@ wpilib_cc_library(
|
||||
wpilib_cc_static_library(
|
||||
name = "static/fieldImages",
|
||||
static_lib_name = select({
|
||||
"@bazel_tools//src/conditions:windows": "static/fieldImages.lib",
|
||||
"@platforms//os:windows": "static/fieldImages.lib",
|
||||
"//conditions:default": "static/libfieldImages.a",
|
||||
}),
|
||||
visibility = ["//visibility:public"],
|
||||
|
||||
@@ -88,7 +88,7 @@ cc_binary(
|
||||
":generate-version",
|
||||
] + glob(["src/app/native/cpp/**"]),
|
||||
linkopts = select({
|
||||
"@bazel_tools//src/conditions:windows": ["-SUBSYSTEM:WINDOWS"],
|
||||
"@platforms//os:windows": ["-SUBSYSTEM:WINDOWS"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
tags = [
|
||||
|
||||
@@ -22,7 +22,7 @@ cc_binary(
|
||||
":generate-version",
|
||||
],
|
||||
linkopts = select({
|
||||
"@bazel_tools//src/conditions:windows": ["-SUBSYSTEM:WINDOWS"],
|
||||
"@platforms//os:windows": ["-SUBSYSTEM:WINDOWS"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
tags = [
|
||||
|
||||
@@ -617,7 +617,7 @@ def wpilib_cc_static_library(
|
||||
static_lib_name = select({
|
||||
"//shared/bazel/rules:compilation_mode_dbg": folder + "/lib" + lib + "d.a",
|
||||
"//shared/bazel/rules:compilation_mode_windows_dbg": folder + "/" + lib + ".lib",
|
||||
"@bazel_tools//src/conditions:windows": folder + "/" + lib + ".lib",
|
||||
"@platforms//os:windows": folder + "/" + lib + ".lib",
|
||||
"//conditions:default": folder + "/lib" + lib + ".a",
|
||||
})
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_test")
|
||||
load("//shared/bazel/rules:cc_rules.bzl", "wpilib_cc_library", "wpilib_cc_static_library")
|
||||
load("//shared/bazel/rules:cc_rules.bzl", "wpilib_cc_library", "wpilib_cc_shared_library", "wpilib_cc_static_library")
|
||||
load("//shared/bazel/rules:packaging.bzl", "package_minimal_cc_project")
|
||||
|
||||
wpilib_cc_library(
|
||||
@@ -57,6 +57,50 @@ wpilib_cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
wpilib_cc_shared_library(
|
||||
name = "shared/halsim_gui",
|
||||
additional_linker_inputs = select({
|
||||
"@platforms//os:osx": [
|
||||
"//thirdparty/imgui_suite:glfw_src_darwin",
|
||||
"//thirdparty/imgui_suite:imgui_src_darwin",
|
||||
"//wpigui:wpigui-mac",
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
dynamic_deps = [
|
||||
"//hal:shared/wpiHal",
|
||||
"//wpimath:shared/wpimath",
|
||||
"//datalog:shared/datalog",
|
||||
"//ntcore:shared/ntcore",
|
||||
],
|
||||
user_link_flags = select({
|
||||
"@platforms//os:osx": [
|
||||
"-Wl,-force_load,$(location //thirdparty/imgui_suite:glfw_src_darwin)",
|
||||
"-Wl,-force_load,$(location //thirdparty/imgui_suite:imgui_src_darwin)",
|
||||
"-Wl,-force_load,$(location //wpigui:wpigui-mac)",
|
||||
"-framework",
|
||||
"Metal",
|
||||
"-framework",
|
||||
"MetalKit",
|
||||
"-framework",
|
||||
"Cocoa",
|
||||
"-framework",
|
||||
"IOKit",
|
||||
"-framework",
|
||||
"CoreFoundation",
|
||||
"-framework",
|
||||
"CoreVideo",
|
||||
"-framework",
|
||||
"QuartzCore",
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":halsim_gui",
|
||||
],
|
||||
)
|
||||
|
||||
wpilib_cc_static_library(
|
||||
name = "static/halsim_gui",
|
||||
static_deps = [
|
||||
|
||||
@@ -37,7 +37,7 @@ cc_binary(
|
||||
name = "sysid",
|
||||
srcs = ["src/main/native/cpp/Main.cpp"],
|
||||
linkopts = select({
|
||||
"@bazel_tools//src/conditions:windows": ["-SUBSYSTEM:WINDOWS"],
|
||||
"@platforms//os:windows": ["-SUBSYSTEM:WINDOWS"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
deps = ["sysid-lib"],
|
||||
|
||||
2
thirdparty/googletest/BUILD.bazel
vendored
2
thirdparty/googletest/BUILD.bazel
vendored
@@ -16,7 +16,7 @@ wpilib_cc_library(
|
||||
wpilib_cc_static_library(
|
||||
name = "static/googletest",
|
||||
static_lib_name = select({
|
||||
"@bazel_tools//src/conditions:windows": "static/googletest.lib",
|
||||
"@platforms//os:windows": "static/googletest.lib",
|
||||
"//conditions:default": "static/libgoogletest.a",
|
||||
}),
|
||||
visibility = ["//visibility:public"],
|
||||
|
||||
30
thirdparty/imgui_suite/BUILD.bazel
vendored
30
thirdparty/imgui_suite/BUILD.bazel
vendored
@@ -165,15 +165,19 @@ cc_library(
|
||||
cc_library(
|
||||
name = "glfw_src",
|
||||
srcs = select({
|
||||
"@bazel_tools//src/conditions:windows": WINDOWS_SOURCES,
|
||||
"@platforms//os:windows": WINDOWS_SOURCES,
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_linux": LINUX_SOURCES,
|
||||
}),
|
||||
defines = select({
|
||||
"@bazel_tools//src/conditions:windows": WINDOWS_DEFINES,
|
||||
"@platforms//os:windows": WINDOWS_DEFINES,
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_linux": LINUX_DEFINES,
|
||||
}),
|
||||
linkopts = select({
|
||||
"@platforms//os:windows": WINDOWS_LINKOPTS,
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_linux": LINUX_LINKOPTS,
|
||||
}),
|
||||
target_compatible_with = select({
|
||||
"@bazel_tools//src/conditions:windows": [],
|
||||
"@platforms//os:windows": [],
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_linux": [],
|
||||
"//conditions:default": ["@platforms//:incompatible"],
|
||||
}),
|
||||
@@ -194,6 +198,7 @@ wpilib_objc_library(
|
||||
defines = DARWIN_DEFINES + ["GLFW_INVALID_CODEPOINT"],
|
||||
include_arc = False,
|
||||
is_cpp = False,
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":glfw_hdrs",
|
||||
],
|
||||
@@ -202,8 +207,8 @@ wpilib_objc_library(
|
||||
cc_library(
|
||||
name = "glfw",
|
||||
linkopts = select({
|
||||
"@bazel_tools//src/conditions:darwin": DARWIN_LINKOPTS,
|
||||
"@bazel_tools//src/conditions:windows": WINDOWS_LINKOPTS,
|
||||
"@platforms//os:osx": DARWIN_LINKOPTS,
|
||||
"@platforms//os:windows": WINDOWS_LINKOPTS,
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_linux": LINUX_LINKOPTS,
|
||||
}),
|
||||
linkstatic = True,
|
||||
@@ -212,8 +217,8 @@ cc_library(
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
deps = [":glfw_hdrs"] + select({
|
||||
"@bazel_tools//src/conditions:darwin": [":glfw_src_darwin"],
|
||||
"@bazel_tools//src/conditions:windows": [":glfw_src"],
|
||||
"@platforms//os:osx": [":glfw_src_darwin"],
|
||||
"@platforms//os:windows": [":glfw_src"],
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_linux": [":glfw_src"],
|
||||
}),
|
||||
)
|
||||
@@ -274,11 +279,11 @@ IMGUI_WIN_HDRS = [
|
||||
cc_library(
|
||||
name = "imgui_src",
|
||||
srcs = IMGUI_COMMON_SOURCES + select({
|
||||
"@bazel_tools//src/conditions:windows": IMGUI_WIN_SRCS,
|
||||
"@platforms//os:windows": IMGUI_WIN_SRCS,
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_linux": IMGUI_LINUX_SRCS,
|
||||
}),
|
||||
hdrs = IMGUI_COMMON_HEADERS + select({
|
||||
"@bazel_tools//src/conditions:windows": IMGUI_WIN_HDRS,
|
||||
"@platforms//os:windows": IMGUI_WIN_HDRS,
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_linux": IMGUI_LINUX_HDRS,
|
||||
}),
|
||||
includes = [
|
||||
@@ -289,7 +294,7 @@ cc_library(
|
||||
linkstatic = True,
|
||||
strip_include_prefix = "imgui/include",
|
||||
target_compatible_with = select({
|
||||
"@bazel_tools//src/conditions:windows": [],
|
||||
"@platforms//os:windows": [],
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_linux": [],
|
||||
"//conditions:default": ["@platforms//:incompatible"],
|
||||
}),
|
||||
@@ -308,6 +313,7 @@ wpilib_objc_library(
|
||||
"imgui/include/backends",
|
||||
"imgui/include/misc/cpp",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":glfw",
|
||||
],
|
||||
@@ -316,8 +322,8 @@ wpilib_objc_library(
|
||||
cc_library(
|
||||
name = "imgui",
|
||||
deps = select({
|
||||
"@bazel_tools//src/conditions:darwin": [":imgui_src_darwin"],
|
||||
"@bazel_tools//src/conditions:windows": [":imgui_src"],
|
||||
"@platforms//os:osx": [":imgui_src_darwin"],
|
||||
"@platforms//os:windows": [":imgui_src"],
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_linux": [":imgui_src"],
|
||||
}),
|
||||
)
|
||||
|
||||
@@ -28,6 +28,7 @@ wpilib_objc_library(
|
||||
"CoreVideo",
|
||||
"QuartzCore",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":headers",
|
||||
"//thirdparty/imgui_suite",
|
||||
@@ -47,8 +48,8 @@ wpilib_cc_library(
|
||||
name = "wpigui",
|
||||
srcs = glob(["src/main/native/cpp/**/*.cpp"]) +
|
||||
select({
|
||||
"@bazel_tools//src/conditions:darwin": [],
|
||||
"@bazel_tools//src/conditions:windows": WIN_SRCS,
|
||||
"@platforms//os:osx": [],
|
||||
"@platforms//os:windows": WIN_SRCS,
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_linux": LINUX_SRCS,
|
||||
}),
|
||||
extra_src_pkg_files = [":native-pkg"],
|
||||
@@ -62,7 +63,7 @@ wpilib_cc_library(
|
||||
":headers",
|
||||
"//thirdparty/imgui_suite",
|
||||
] + select({
|
||||
"@bazel_tools//src/conditions:darwin": [":wpigui-mac"],
|
||||
"@platforms//os:osx": [":wpigui-mac"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
)
|
||||
@@ -73,7 +74,7 @@ wpilib_cc_static_library(
|
||||
"//thirdparty/imgui_suite:static/imguiSuite",
|
||||
],
|
||||
static_lib_name = select({
|
||||
"@bazel_tools//src/conditions:windows": "static/wpigui.lib",
|
||||
"@platforms//os:windows": "static/wpigui.lib",
|
||||
"//conditions:default": "static/libwpigui.a",
|
||||
}),
|
||||
visibility = ["//visibility:public"],
|
||||
|
||||
@@ -96,7 +96,10 @@ wpilib_cc_library(
|
||||
copts = [
|
||||
# TODO(austin): this needs to be different for shared vs dynamic.
|
||||
"-DDYNAMIC_CAMERA_SERVER",
|
||||
],
|
||||
] + select({
|
||||
"//shared/bazel/rules:compilation_mode_dbg": ["-DDYNAMIC_CAMERA_SERVER_DEBUG"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
extra_src_pkg_files = [
|
||||
":generated_version_files_pkg",
|
||||
],
|
||||
|
||||
@@ -67,8 +67,8 @@ filegroup(
|
||||
"//conditions:default": [],
|
||||
}) +
|
||||
select({
|
||||
"@bazel_tools//src/conditions:darwin": MAC_UV_SRCS,
|
||||
"@bazel_tools//src/conditions:windows": WIN_UV_SRCS,
|
||||
"@platforms//os:osx": MAC_UV_SRCS,
|
||||
"@platforms//os:windows": WIN_UV_SRCS,
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_linux": LINUX_UV_SRCS,
|
||||
}) + glob(["src/main/native/thirdparty/libuv/src/*"]),
|
||||
visibility = ["//wpinet:__subpackages__"],
|
||||
@@ -102,8 +102,8 @@ generate_resources(
|
||||
filegroup(
|
||||
name = "native-srcs",
|
||||
srcs = ["generate-resources"] + select({
|
||||
"@bazel_tools//src/conditions:darwin": glob(["src/main/native/macOS/*"]),
|
||||
"@bazel_tools//src/conditions:windows": glob(["src/main/native/windows/*"]),
|
||||
"@platforms//os:osx": glob(["src/main/native/macOS/*"]),
|
||||
"@platforms//os:windows": glob(["src/main/native/windows/*"]),
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_linux": glob(["src/main/native/linux/*"]),
|
||||
}),
|
||||
)
|
||||
@@ -131,7 +131,7 @@ wpilib_cc_library(
|
||||
],
|
||||
includes = ["src/main/native/include"],
|
||||
linkopts = select({
|
||||
"@bazel_tools//src/conditions:linux": [
|
||||
"@platforms//os:linux": [
|
||||
"-Wl,--push-state,-as-needed",
|
||||
"-ldl",
|
||||
"-Wl,--pop-state",
|
||||
|
||||
@@ -124,7 +124,7 @@ generate_resources(
|
||||
filegroup(
|
||||
name = "native-srcs",
|
||||
srcs = select({
|
||||
"@bazel_tools//src/conditions:windows": glob(["src/main/native/windows/*.cpp"]),
|
||||
"@platforms//os:windows": glob(["src/main/native/windows/*.cpp"]),
|
||||
"@rules_bzlmodrio_toolchains//constraints/combined:is_unix": glob(["src/main/native/unix/*.cpp"]),
|
||||
}),
|
||||
)
|
||||
|
||||
@@ -22,11 +22,12 @@ wpilib_cc_library(
|
||||
wpilib_cc_shared_library(
|
||||
name = "shared/xrpVendordep",
|
||||
dynamic_deps = [
|
||||
"//hal:shared/wpiHal",
|
||||
"//ntcore:shared/ntcore",
|
||||
"//wpilibc:shared/wpilibc",
|
||||
"//wpinet:shared/wpinet",
|
||||
"//wpiutil:shared/wpiutil",
|
||||
"//wpimath:shared/wpimath",
|
||||
"//hal:shared/wpiHal",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [":xrpVendordep"],
|
||||
|
||||
Reference in New Issue
Block a user