'Bazel - What is the equivalent of CMake find_package but in Bazel?
My Bazel project contains a cc_binary with a main.cpp file, which includes some header file: foo.h
On my main.cpp, I am invoking a function myFunc() that is defined in foo.h, but the implementation of it is somewhere inside some library installed on my system, which I don't know which one but know the location.
Let's say it's here: /usr/local/bar/... (inside this folder I have a bunch of libxxx.so files)
If I compile I get an undefined reference to myFunc(..).
Using CMake I can compile just by adding the following line on my CMakeLists.txt file: find_package(BAR) and get the necessary libraries.
What is the equivalent procedure in Bazel?
Something like creating a cc_library that contains a glob of all *.so files?
What is a good practice here?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
