Reputation: 12138
Is there a way to specify a Bazel target like with cc_library
but for an existing pre-built static or shared library.
I couldn't find a reference to such a rule in the Bazel documentation.
Upvotes: 0
Views: 497
Reputation: 81
The cc_import rule does precisely what you're asking and I believe a little bit cleaner than the accepted answer.
Upvotes: 1
Reputation: 4271
You can use cc_library
itself, just put .so
files in cc_library.srcs
. See the docs.
Upvotes: 2