mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[bazel] Package headers in ntcoreffi correctly (#8170)
* [bazel] Package headers in ntcoreffi correctly The original package includes headers from ntcore and wpiutil, so include those too. * Merge in new 2027
This commit is contained in:
@@ -57,6 +57,7 @@ third_party_cc_lib_helper(
|
||||
include_root = "src/generated/main/native/include",
|
||||
src_excludes = ["src/generated/main/native/cpp/jni/**"],
|
||||
src_root = "src/generated/main/native/cpp",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
|
||||
@@ -33,6 +33,20 @@ wpilib_cc_library(
|
||||
"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",
|
||||
"//ntcore:ntcore-hdrs-pkg",
|
||||
"//ntcore:generated_cc-hdrs-pkg",
|
||||
],
|
||||
include_license_files = True,
|
||||
strip_include_prefix = "src/main/native/include",
|
||||
visibility = ["//visibility:public"],
|
||||
|
||||
@@ -222,6 +222,7 @@ def third_party_cc_lib_helper(
|
||||
name = name + "-hdrs-pkg",
|
||||
srcs = native.glob([include_root + "/**"]),
|
||||
strip_prefix = include_root,
|
||||
visibility = visibility,
|
||||
)
|
||||
|
||||
if src_root:
|
||||
@@ -252,6 +253,7 @@ def wpilib_cc_library(
|
||||
hdrs_pkg_root = "src/main/native/include",
|
||||
strip_include_prefix = None,
|
||||
linkopts = None,
|
||||
visibility = None,
|
||||
**kwargs):
|
||||
"""
|
||||
This function is used to ease the creation of a cc_library with publishing given the standard allwpilib directory structure.
|
||||
@@ -284,6 +286,7 @@ def wpilib_cc_library(
|
||||
hdrs = hdrs,
|
||||
deps = [lib + "-headers" for lib in third_party_libraries + third_party_header_only_libraries],
|
||||
strip_include_prefix = strip_include_prefix,
|
||||
visibility = visibility,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
@@ -295,6 +298,7 @@ def wpilib_cc_library(
|
||||
deps = deps + [lib + "-headers" for lib in third_party_libraries + third_party_header_only_libraries],
|
||||
strip_include_prefix = strip_include_prefix,
|
||||
linkopts = linkopts,
|
||||
visibility = visibility,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
@@ -316,6 +320,7 @@ def wpilib_cc_library(
|
||||
name = name + "-hdrs-pkg",
|
||||
srcs = native.glob([hdrs_pkg_root + "/**"]),
|
||||
strip_prefix = hdrs_pkg_root,
|
||||
visibility = visibility,
|
||||
)
|
||||
|
||||
pkg_zip(
|
||||
|
||||
@@ -85,51 +85,60 @@ third_party_cc_lib_helper(
|
||||
name = "argparse",
|
||||
include_root = "src/main/native/thirdparty/argparse/include",
|
||||
src_root = None,
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
third_party_cc_lib_helper(
|
||||
name = "debugging",
|
||||
include_root = "src/main/native/thirdparty/debugging/include",
|
||||
src_root = "src/main/native/thirdparty/debugging/src",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
third_party_cc_lib_helper(
|
||||
name = "expected",
|
||||
include_root = "src/main/native/thirdparty/expected/include",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
third_party_cc_lib_helper(
|
||||
name = "fmtlib",
|
||||
include_root = "src/main/native/thirdparty/fmtlib/include",
|
||||
src_root = "src/main/native/thirdparty/fmtlib/src",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
third_party_cc_lib_helper(
|
||||
name = "json",
|
||||
include_root = "src/main/native/thirdparty/json/include",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
third_party_cc_lib_helper(
|
||||
name = "llvm",
|
||||
include_root = "src/main/native/thirdparty/llvm/include",
|
||||
src_root = "src/main/native/thirdparty/llvm/cpp",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
third_party_cc_lib_helper(
|
||||
name = "mpack",
|
||||
include_root = "src/main/native/thirdparty/mpack/include",
|
||||
src_root = "src/main/native/thirdparty/mpack/src",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
third_party_cc_lib_helper(
|
||||
name = "nanopb",
|
||||
include_root = "src/main/native/thirdparty/nanopb/include",
|
||||
src_root = "src/main/native/thirdparty/nanopb/src",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
third_party_cc_lib_helper(
|
||||
name = "sigslot",
|
||||
include_root = "src/main/native/thirdparty/sigslot/include",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
third_party_cc_lib_helper(
|
||||
|
||||
Reference in New Issue
Block a user