-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathqt_mac_aarch64.BUILD
66 lines (58 loc) · 1.67 KB
/
qt_mac_aarch64.BUILD
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
59
60
61
62
63
64
65
66
load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@rules_qt//:qt_libraries.bzl", "QT_LIBRARIES")
[
cc_library(
name = "qt_%s_mac" % name,
hdrs = glob(["lib/%s.framework/Headers/**" % include_folder]), # allow_empty = True
includes = [
"lib/%s.framework/Headers" % include_folder,
],
additional_linker_inputs = [":lib"],
linkopts = ["-F $(location :lib)"] + [
"-framework %s" % library_name.replace("6", ""), # macOS qt libs do not contain a 6 - e.g. instead of Qt6Core the lib is called QtCore
"-rpath $(rootpath :lib)",
],
include_prefix = "%s" % include_folder,
strip_include_prefix = "lib/%s.framework/Headers" % include_folder,
target_compatible_with = ["@platforms//os:osx"],
visibility = ["//visibility:public"],
)
for name, include_folder, library_name, _ in QT_LIBRARIES
]
cc_library(
name = "qt_hdrs",
hdrs = glob(["include/**"]),
includes = [
"include",
],
visibility = ["//visibility:public"],
)
filegroup(
name = "uic",
srcs = ["libexec/uic"],
visibility = ["//visibility:public"],
)
filegroup(
name = "moc",
srcs = ["libexec/moc"],
visibility = ["//visibility:public"],
)
filegroup(
name = "rcc",
srcs = ["libexec/rcc"],
visibility = ["//visibility:public"],
)
filegroup(
name = "plugin_files",
srcs = glob(["plugins/**/*"]),
visibility = ["//visibility:public"],
)
filegroup(
name = "qml_files",
srcs = glob(["qml/**/*"]),
visibility = ["//visibility:public"],
)
exports_files(
["qml", "plugins", "lib"],
visibility = ["//visibility:public"],
)