mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
This updates to the 2027-1 toolchains. This also is the first version with the `rules_bzlmodrio_toolchains -> wpilib_toolchains` rename, so the surface area of the change is a little bit big. The opencv dep has bzlmod'ified as part of this as well.
44 lines
1.7 KiB
Python
44 lines
1.7 KiB
Python
"""
|
|
Ceres Solver files
|
|
"""
|
|
|
|
load("@rules_cc//cc:defs.bzl", "cc_import", "cc_library")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
cc_import(
|
|
name = "ceres-impl",
|
|
static_library = select({
|
|
"@wpilib_toolchains//conditions:linux_x86_64": "@ceres_linuxx86-64static//:lib",
|
|
"@wpilib_toolchains//conditions:linux_x86_64_debug": "@ceres_linuxx86-64staticdebug//:lib",
|
|
"@wpilib_toolchains//conditions:osx": "@ceres_osxuniversalstatic//:lib",
|
|
"@wpilib_toolchains//conditions:osx_debug": "@ceres_osxuniversalstaticdebug//:lib",
|
|
"@wpilib_toolchains//conditions:windows_arm64": "@ceres_windowsarm64static//:lib",
|
|
"@wpilib_toolchains//conditions:windows_arm64_debug": "@ceres_windowsarm64staticdebug//:lib",
|
|
"@wpilib_toolchains//conditions:windows_x86_64": "@ceres_windowsx86-64static//:lib",
|
|
"@wpilib_toolchains//conditions:windows_x86_64_debug": "@ceres_windowsx86-64staticdebug//:lib",
|
|
"@wpilib_toolchains//constraints/is_trixie64:trixie64": "@ceres_linuxarm64static//:lib",
|
|
"@wpilib_toolchains//constraints/is_trixie64:trixie64_debug": "@ceres_linuxarm64staticdebug//:lib",
|
|
"//conditions:default": None,
|
|
}),
|
|
)
|
|
|
|
cc_library(
|
|
name = "ceres",
|
|
defines = [
|
|
"GLOG_NO_GFLAGS",
|
|
"GLOG_USE_GLOG_EXPORT",
|
|
] + select({
|
|
"@platforms//os:windows": ["GLOG_DEPRECATED=__declspec(deprecated)"],
|
|
"//conditions:default": ["GLOG_DEPRECATED=[[deprecated]]"],
|
|
}),
|
|
linkopts = select({
|
|
"@platforms//os:windows": ["dbghelp.lib"],
|
|
"//conditions:default": [],
|
|
}),
|
|
deps = [
|
|
":ceres-impl",
|
|
"@ceres_headers//:headers",
|
|
],
|
|
)
|