# -*- bazel -*-

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

EIGEN_DEFINES = split_cmake_list(
    "$<TARGET_PROPERTY:Eigen3::Eigen,INTERFACE_COMPILE_DEFINITIONS>",
)

cc_library(
    name = "eigen",
    hdrs = glob(
        [
            "include/Eigen/**",
            "include/unsupported/Eigen/**",
        ],
        allow_empty = False,
    ),
    defines = EIGEN_DEFINES,
    includes = ["include"],
    visibility = ["//visibility:public"],
)

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