BUILD 1.6 KB
Newer Older
1
load("@rules_cc//cc:defs.bzl", "cc_binary")
2
load("//third_party/qt5:qt.bzl", "qt_cc_library")
3 4 5 6 7

package(default_visibility = ["//visibility:public"])

cc_binary(
    name = "cyber_visualizer",
8 9 10
    copts = [
        "-Iexternal/qt",
    ],
11 12 13
    includes = [
        ".",
    ],
14 15 16
    linkopts = [
        "-pthread",
    ],
17 18
    deps = [
        ":visualizer_lib",
19 20
        "//third_party:console_bridge",
        "//third_party:glvnd",
21
        "@fastrtps",
22 23 24 25
        "@qt//:qt_core",
        "@qt//:qt_gui",
        "@qt//:qt_opengl",
        "@qt//:qt_widgets",
26 27 28
    ],
)

29
# TODO(all): Extract the large library to thin pieces.
30 31 32 33
# name, src, hdr, uis = [], res = [], normal_hdrs = [], deps = None
qt_cc_library(
    name = "visualizer_lib",
    src = glob(
A
Aaron Xiao 已提交
34
        ["*.cc"],
35
    ),
A
Aaron Xiao 已提交
36 37
    copts = [
        "-Imodules/drivers/proto",
38
        "-Iexternal/qt",
39
        "-fPIC",
A
Aaron Xiao 已提交
40
    ],
41 42 43 44 45 46
    hdr = glob([
        "*.h",
    ]),
    includes = [
        ".",
    ],
A
Aaron Xiao 已提交
47 48 49 50 51 52 53
    linkstatic = 1,
    res = glob([
        "*.qrc",
    ]),
    uis = glob([
        "uis/*.ui",
    ]),
54
    deps = [
G
GoLancer 已提交
55
        "//cyber",
56 57
        "//modules/drivers/proto:pointcloud_cc_proto",
        "//modules/drivers/proto:radar_cc_proto",
58
        "//modules/drivers/proto:sensor_image_cc_proto",
59 60 61 62
        "@qt//:qt_core",
        "@qt//:qt_gui",
        "@qt//:qt_opengl",
        "@qt//:qt_widgets",
63 64
    ],
)
65

66 67 68 69
# TODO(all): Disable linter temporarily as the generated ui files should be
# excluded from check. But we should also check the .h and .cc files, if they
# are extracted to their own cc_libraries. See the TODO above.
# cpplint()