srctree

Robin Linden parent e8a4ebaa c03f8472
deps/sfml: Fix SFML's glad leaking into other libraries

It wasn't a false positive. :(

inlinesplit
third_party/imgui-sfml.BUILD added: 5, removed: 12, total 0
@@ -1,12 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_library")
 
# TODO(robinlinden): False positive layering check error. Related to glad being
# a local_repository? See: bazel-out/k8-fastbuild/bin/external/glad/glad.cppmap
#
# external/imgui-sfml/imgui-SFML.cpp:4:10: error: module imgui-sfml//:imgui-sfml
# does not depend on a module exporting 'glad/gl.h'
package(features = ["-layering_check"])
 
cc_library(
name = "imgui-sfml",
srcs = ["imgui-SFML.cpp"],
 
third_party/sfml.BUILD added: 5, removed: 12, total 0
@@ -93,6 +93,7 @@ cc_library(
hdrs = glob(["include/SFML/Window/*"]),
copts = ["-Iexternal/sfml/src/"],
defines = SFML_DEFINES,
implementation_deps = [":sf_glad"],
linkopts = select({
"@platforms//os:linux": ["-lX11"],
"@platforms//os:windows": [
@@ -109,7 +110,6 @@ cc_library(
"//conditions:default": [],
}),
deps = [
":sf_glad",
":system",
"@vulkan",
] + select({
@@ -145,6 +145,7 @@ objc_library(
"-frtti",
],
defines = SFML_DEFINES,
implementation_deps = [":sf_glad"],
includes = ["include/"],
non_arc_srcs = glob([
"src/SFML/Window/OSX/*.m",
@@ -161,7 +162,6 @@ objc_library(
"//conditions:default": ["@platforms//:incompatible"],
}),
deps = [
":sf_glad",
":system",
],
)
@@ -177,6 +177,7 @@ cc_library(
hdrs = glob(["include/SFML/Graphics/*"]),
copts = ["-Iexternal/sfml/src/"],
defines = SFML_DEFINES,
implementation_deps = [":sf_glad"],
includes = ["include/"],
linkopts = select({
"@platforms//os:linux": ["-lX11"],
@@ -186,7 +187,6 @@ cc_library(
strip_include_prefix = "include/",
visibility = ["//visibility:public"],
deps = [
":sf_glad",
":system",
":window",
"@freetype2",