mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
This primarily fixes up the bazel publishing to match the gradle publishing again, as some new libraries were added but not hooked up to the maven publishing. During the process, I noticed that the 3rd party libraries (googletest, catch2, and imgui_suite) were still getting published on the old `edu.wpi` namespace. I tried to clean up all the other references to that that I could. Note: opencv and libssh are handled outside `allwpilib` so they need to be updated separately.
76 lines
2.1 KiB
Python
76 lines
2.1 KiB
Python
load("@rules_cc//cc:cc_library.bzl", "cc_library")
|
|
load("@rules_python//python:defs.bzl", "py_binary")
|
|
load("//shared/bazel/rules:cc_rules.bzl", "wpilib_cc_library", "wpilib_cc_shared_library")
|
|
load("//shared/bazel/rules:packaging.bzl", "package_shared_cc_project")
|
|
|
|
py_binary(
|
|
name = "generate_exported_symbols",
|
|
srcs = [
|
|
"generate_exported_symbols.py",
|
|
],
|
|
)
|
|
|
|
genrule(
|
|
name = "do_generate_exported_symbols",
|
|
srcs = ["src/main/native/symbols.txt"],
|
|
outs = ["src/generated/headers/ExportedSymbols.h"],
|
|
cmd = "$(location :generate_exported_symbols) --output $(OUTS) --symbols $(SRCS)",
|
|
tools = [":generate_exported_symbols"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "exported_symbols",
|
|
hdrs = [
|
|
"src/generated/headers/ExportedSymbols.h",
|
|
],
|
|
strip_include_prefix = "src/generated/headers/",
|
|
)
|
|
|
|
wpilib_cc_library(
|
|
name = "ntcoreffi",
|
|
srcs = glob([
|
|
"src/main/native/c/**",
|
|
"src/main/native/cpp/**",
|
|
]),
|
|
hdrs = glob(["src/main/native/include/**"]),
|
|
extra_hdr_pkg_files = [
|
|
"//wpiutil:fmtlib-hdrs-pkg",
|
|
"//wpiutil:llvm-hdrs-pkg",
|
|
"//wpiutil:wpiutil-hdrs-pkg",
|
|
"//wpiutil:json-hdrs-pkg",
|
|
"//wpiutil:mpack-hdrs-pkg",
|
|
"//wpiutil:expected-hdrs-pkg",
|
|
"//wpiutil:debugging-hdrs-pkg",
|
|
"//wpiutil:sigslot-hdrs-pkg",
|
|
"//wpiutil:nanopb-hdrs-pkg",
|
|
"//wpiutil:argparse-hdrs-pkg",
|
|
"//wpiutil:upb-hdrs-pkg",
|
|
"//wpiutil:double-conversion-hdrs-pkg",
|
|
"//ntcore:ntcore-hdrs-pkg",
|
|
"//ntcore:generated_cc-hdrs-pkg",
|
|
],
|
|
include_license_files = True,
|
|
strip_include_prefix = "src/main/native/include",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":exported_symbols",
|
|
"//ntcore",
|
|
"//wpinet",
|
|
"//wpiutil",
|
|
],
|
|
)
|
|
|
|
wpilib_cc_shared_library(
|
|
name = "shared/ntcoreffi",
|
|
symbols = "src/main/native/symbols.txt",
|
|
use_debug_name = False,
|
|
visibility = ["//visibility:public"],
|
|
deps = [":ntcoreffi"],
|
|
)
|
|
|
|
package_shared_cc_project(
|
|
name = "ntcoreffi",
|
|
maven_artifact_name = "ntcoreffi-cpp",
|
|
maven_group_id = "org.wpilib.ntcoreffi",
|
|
)
|