load("@rules_cc//cc:cc_library.bzl", "cc_library")

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

# This rule is created from pkg-config
#
# packages="fcitx"
# copts, hdrs, indludes: pkg-config --cflags $packages
# linkopts: pkg-config --libs-only-l $packages

cc_library(
    name = "fcitx",
    hdrs = glob([
        "include/fcitx/**",
        "include/fcitx-config/**",
        "include/fcitx-utils/**",
    ]),
    copts = ["-pthread"],
    includes = [
        "include",
    ],
    linkopts = [
        "-lfcitx-core",
        "-lfcitx-config",
        "-lfcitx-utils",
    ],
)
