Bazel rules for pkg-config tools.
Add the following in your WORKSPACE
:
http_archive(
name = "bazel_pkg_config",
strip_prefix = "bazel_pkg_config-master",
urls = ["https://github.com/cherrry/bazel_pkg_config/archive/master.zip"],
)
load("@bazel_pkg_config//:pkg_config.bzl", "pkg_config")
pkg_config(
name = "library_to_load",
# See pkg_config.bzl for more available options.
)
In your code:
#include "library_to_load/header.h"
// ...
In corresponding BUILD
file:
cc_library(
name = "my_lib",
deps = [
"@library_to_load//:lib",
],
)