Files
allwpilib/wpilibc/robotpy_native_build_info.bzl
PJ Reiniger 892666fbbe [robotpy] Add build scripts for wpilib and dependencies (#8348)
This gets the majority of projects from mostrobotpy building in this mirror. Projects missing still are cscore and the halsim wrappers.
2025-11-09 10:32:58 -08:00

43 lines
1.7 KiB
Python
Generated

# THIS FILE IS AUTO GENERATED
load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory")
load("//shared/bazel/rules/robotpy:pybind_rules.bzl", "native_wrappery_library")
def define_native_wrapper(name, pyproject_toml = None):
copy_to_directory(
name = "{}.copy_headers".format(name),
srcs = native.glob(["src/main/native/include/**"]) + native.glob(["src/generated/main/native/include/**"], allow_empty = True),
out = "native/wpilib/include",
root_paths = ["src/main/native/include/"],
replace_prefixes = {
"wpilibc/src/generated/main/native/include": "",
"wpilibc/src/main/native/include": "",
},
verbose = False,
visibility = ["//visibility:public"],
)
native_wrappery_library(
name = name,
pyproject_toml = pyproject_toml or "src/main/python/native-pyproject.toml",
libinit_file = "native/wpilib/_init_robotpy_native_wpilib.py",
pc_file = "native/wpilib/robotpy-native-wpilib.pc",
pc_deps = [
"//ntcore:native/ntcore/robotpy-native-ntcore.pc",
"//hal:native/wpihal/robotpy-native-wpihal.pc",
"//wpimath:native/wpimath/robotpy-native-wpimath.pc",
"//wpinet:native/wpinet/robotpy-native-wpinet.pc",
"//wpiutil:native/wpiutil/robotpy-native-wpiutil.pc",
],
deps = [
"//ntcore:robotpy-native-ntcore",
"//hal:robotpy-native-wpihal",
"//wpimath:robotpy-native-wpimath",
"//wpinet:robotpy-native-wpinet",
"//wpiutil:robotpy-native-wpiutil",
],
headers = "{}.copy_headers".format(name),
native_shared_library = "shared/wpilibc",
install_path = "native/wpilib/",
)