-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathBUILD.bazel
50 lines (44 loc) · 1.33 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
load("@rules_qt//:qt_libraries.bzl", "QT_LIBRARIES")
config_setting(
name = "osx_arm64",
constraint_values = [
"@platforms//os:osx",
"@platforms//cpu:aarch64",
],
)
config_setting(
name = "osx_x86_64",
constraint_values = [
"@platforms//os:osx",
"@platforms//cpu:x86_64",
],
)
[
cc_library(
name = "qt_%s" % name,
visibility = ["//visibility:public"],
deps = dependencies + select({
"@platforms//os:linux": ["@qt_linux_x86_64//:qt_%s_linux" % name],
":osx_x86_64": ["@qt_mac_x86_64//:qt_%s_mac" % name],
":osx_arm64": ["@qt_mac_aarch64//:qt_%s_mac" % name],
"@platforms//os:windows": ["@qt_windows_x86_64//:qt_%s_windows" % name],
}),
)
for name, _, _, dependencies in QT_LIBRARIES
]
cc_library(
name = "qt_hdrs",
visibility = ["//visibility:public"],
deps = select({
"@platforms//os:linux": ["@qt_linux_x86_64//:qt_hdrs"],
":osx_x86_64": ["@qt_mac_x86_64//:qt_hdrs"],
":osx_arm64": ["@qt_mac_aarch64//:qt_hdrs"],
"@platforms//os:windows": ["@qt_windows_x86_64//:qt_hdrs"],
}),
)
all_qt_libs = [":qt_%s" % name for name, _, _, _ in QT_LIBRARIES]
cc_library(
name = "qt",
visibility = ["//visibility:public"],
deps = all_qt_libs + [":qt_hdrs"],
)