bazel-contrib / bazel-contrib/rules_foreign_cc

How to Reference Shared Library from cmake?

Open
#1,078 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Starlark
Stars
737
Forks
270
PR merge metrics
No merged PRs in 30d

Description

Hi, if I’m trying to set an environment variable within cmake for rules_foreign_cc
based on the output of another shared_lib generated by cmake, what would be the proper way to do so?

cmake(
name = "lib",
cache_entries = {
"path_to_shared_lib": ""
}
)

cmake(
name = "fake",
...
out_shared_libs = [
"libfake.so",
],
visibility = ["//visibility:public"],
)

Contributor guide

Open the contributing guide

Research direction

Start by investigating the rules_foreign_cc CMake integration, especially how cache_entries relates to outputs declared with out_shared_libs. The issue names no source files or tests, so first determine the supported way to pass the generated libfake.so path into another cmake rule; done means documenting a verified configuration or clarifying that it is unsupported.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.