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:
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"],
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user