2
0
Fork 0
mirror of https://github.com/bazel-contrib/rules_foreign_cc synced 2024-11-30 16:42:07 +00:00
rules_foreign_cc/examples/cmake_defines/BUILD.bazel
UebelAndre edbfa3bfa9
Restructured rules to match architecture (#555)
* Restructured rules to match architecture

* Added exports of all symbols in the deprecated location for legacy support

* Updated examples
2021-03-12 16:54:14 +00:00

38 lines
762 B
Python

load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")
cmake(
name = "lib_a",
lib_source = ":lib_a_sources",
out_static_libs = select({
"//:windows": ["lib_a.lib"],
"//conditions:default": ["liblib_a.a"],
}),
deps = [":lib_b"],
)
cmake(
name = "lib_b",
defines = ["FOO"],
lib_source = ":lib_b_sources",
out_static_libs = select({
"//:windows": ["lib_b.lib"],
"//conditions:default": ["liblib_b.a"],
}),
)
filegroup(
name = "lib_a_sources",
srcs = ["lib_a/{}".format(s) for s in [
"CMakeLists.txt",
"lib_a.cpp",
]],
)
filegroup(
name = "lib_b_sources",
srcs = ["lib_b/{}".format(s) for s in [
"CMakeLists.txt",
"lib_b.cpp",
]],
)