forked from maplibre/maplibre-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
58 lines (56 loc) · 1.31 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
load("//bazel:flags.bzl", "CPP_FLAGS", "MAPLIBRE_FLAGS")
objc_library(
name = "metal_backend",
srcs = [
"glfw_backend.hpp",
"glfw_metal_backend.h",
"glfw_metal_backend.mm",
"metal_backend.h",
"metal_backend.mm",
],
copts = CPP_FLAGS + MAPLIBRE_FLAGS,
deps = [
"//:maplibre_lib",
"@glfw",
],
)
cc_binary(
name = "glfw_app",
srcs = glob(
[
"*.cpp",
"*.hpp",
],
exclude = [
"glfw_*_backend.*",
],
) +
select({
"//:metal_renderer": [
],
"//conditions:default": [
"glfw_gl_backend.cpp",
"glfw_gl_backend.hpp",
],
}),
copts = CPP_FLAGS + MAPLIBRE_FLAGS,
linkopts = [
"-lglfw",
] + select({
"@platforms//os:macos": [
"-framework Cocoa",
"-framework IOKit",
],
"//conditions:default": [],
}),
visibility = [
"@rules_xcodeproj//xcodeproj:generated",
],
deps = [
"//:maplibre_lib",
"@glfw",
] + select({
"@platforms//os:macos": ["metal_backend"],
"//conditions:default": [],
}),
)