# -*- bazel -*-

load(
    "@drake//:cmake/external/workspace/conversion.bzl",
    "split_cmake_list",
)
load("@drake//tools/install:install.bzl", "install")

_DEFINES = split_cmake_list(
    "$<TARGET_PROPERTY:fmt::fmt,INTERFACE_COMPILE_DEFINITIONS>",
)

cc_library(
    name = "fmt",
    srcs = glob(
        ["lib/**"],
        allow_empty = False,
    ),
    hdrs = glob(
        ["include/fmt/**"],
        allow_empty = False,
    ),
    defines = _DEFINES,
    includes = ["include"],
    visibility = ["//visibility:public"],
)

install(
    name = "install",
    visibility = ["//visibility:public"],
)
