2
0
Fork 0
mirror of https://github.com/bazel-contrib/rules_foreign_cc synced 2024-12-01 22:16:27 +00:00
rules_foreign_cc/examples/cmake_crosstool/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

30 lines
750 B
Python

load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")
filegroup(
name = "srcs",
srcs = glob(["**"]),
visibility = ["//src/test/shell/bazel/testdata:__pkg__"],
)
cc_library(
name = "hello",
srcs = ["hello.cc"],
)
cmake(
name = "hello_cmake",
lib_source = "//static:srcs",
out_include_dir = "include/version123",
out_static_libs = ["libhello.a"],
)
# I do not make it a test, since it is a cross-compilation example,
# requires test that just checks something about output
cc_binary(
name = "libhello_test",
# includes just hello.h, include directory: "include/version123"
srcs = ["//static:hello_client.c"],
deps = [":hello_cmake"],
)