bazel-contrib / bazel-contrib/rules_foreign_cc
Feature Request: How can I add a include path of a deps library in rule cmake?
- Dominant language
- Starlark
- Stars
- 737
- Forks
- 270
- PR merge metrics
- No merged PRs in 30d
Description
Dear all,
I need you experts' help to use the rule cmake in a specific way.
1. The project to use rule cmake(), called XXXX, need a library called "libacl". But I cannot simply install the libacl by apt.
2. I use cc_import() to create a library with shared_library and header files. I wrote a demo file to use the cc_import library which is OK to use. The can be found.
3. But if I simply add a argument "@libacl//:libacl" just like I used in the demo code in the XXXX project with cmake(). It didn't work.
From the cmake log, I can see that the libacl project was copied to the ext_build_deps folder. But after I enabled the verbose of cmake, the include path of the "libacl" was not passed to gcc.
"-I" parameter is only followed by the XXXX's include path.
How should I use rule cmake in this case?
Contributor guide
Research direction
The issue names no files or tests. Start by reproducing the XXXX cmake() case with the cc_import() libacl target and inspect the verbose CMake command to trace whether its include path reaches gcc; done means the libacl include path is passed to the cmake-built target.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100