2
0
Fork 0
mirror of https://github.com/bazel-contrib/rules_foreign_cc synced 2024-11-29 12:33:51 +00:00
rules_foreign_cc/examples/cmake_working_dir/BUILD

28 lines
540 B
Python
Raw Normal View History

load("@rules_foreign_cc//tools/build_defs:cmake.bzl", "cmake_external")
filegroup(
name = "sources",
srcs = glob(
["source_root/**"],
exclude_directories = 0,
),
)
cmake_external(
name = "liba",
lib_source = ":sources",
# This demonstrates the usage of the working directory:
# the directory where the "main" CMakeLists.txt file resides.
working_directory = "cmake_dir",
)
cc_test(
name = "test_lib",
srcs = [
"test_liba.cpp",
],
deps = [
":liba",
],
)