srctree

Robin Linden parent da053b49 884c35cf
deps/sfml: Fix depending on window_macos marking targets as incompatible

As an added bonus, now there's no need to manually select when you want the macos-version instead of the normal one.
browser/gui/BUILD added: 25, removed: 25, total 0
@@ -31,9 +31,7 @@ cc_binary(
"@imgui-sfml",
"@sfml//:graphics",
"@sfml//:system",
"@sfml//:window",
"@spdlog",
] + select({
"@platforms//os:macos": ["@sfml//:window_macos"],
"//conditions:default": ["@sfml//:window"],
}),
],
)
 
gfx/BUILD added: 25, removed: 25, total 0
@@ -107,8 +107,6 @@ cc_binary(
":sfml",
"//type:sfml",
"@sfml//:graphics",
] + select({
"@platforms//os:macos": ["@sfml//:window_macos"],
"//conditions:default": ["@sfml//:window"],
}),
"@sfml//:window",
],
)
 
img/BUILD added: 25, removed: 25, total 0
@@ -79,8 +79,6 @@ cc_binary(
"//gfx:sfml",
"//type:sfml",
"@sfml//:graphics",
] + select({
"@platforms//os:macos": ["@sfml//:window_macos"],
"//conditions:default": ["@sfml//:window"],
}),
"@sfml//:window",
],
)
 
third_party/imgui-sfml.BUILD added: 25, removed: 25, total 0
@@ -19,8 +19,6 @@ cc_library(
"@imgui",
"@sfml//:graphics",
"@sfml//:system",
] + select({
"@platforms//os:macos": ["@sfml//:window_macos"],
"//conditions:default": ["@sfml//:window"],
}),
"@sfml//:window",
],
)
 
third_party/sfml.BUILD added: 25, removed: 25, total 0
@@ -57,8 +57,18 @@ cc_library(
visibility = ["//visibility:public"],
)
 
cc_library(
alias(
name = "window",
actual = select({
"@platforms//os:linux": ":window_cc",
"@platforms//os:macos": ":window_objc",
"@platforms//os:windows": ":window_cc",
}),
visibility = ["//visibility:public"],
)
 
cc_library(
name = "window_cc",
srcs = glob(
include = [
"src/SFML/Window/*.cpp",
@@ -98,7 +108,6 @@ cc_library(
"@platforms//os:macos": ["@platforms//:incompatible"],
"//conditions:default": [],
}),
visibility = ["//visibility:public"],
deps = [
":sf_glad",
":system",
@@ -114,7 +123,7 @@ cc_library(
)
 
objc_library(
name = "window_macos",
name = "window_objc",
srcs = glob(
include = [
"src/SFML/Window/*.cpp",
@@ -151,7 +160,6 @@ objc_library(
"@platforms//os:macos": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
visibility = ["//visibility:public"],
deps = [
":sf_glad",
":system",