Exposing a CMake Subproject to a Meson Dependency #11823
Unanswered
ChristianJacobsen
asked this question in
Q&A
Replies: 1 comment 1 reply
-
This sounds like essentially #8104 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
Can I provide a CMake Subproject with a dependency from Meson?
The case here is the library opentelemetry-cpp, which uses the CMake build system.
When compiled using the option
WITH_OTLP
it depends on Protobuf, gRPC, and the JSON library by Niels Lohmann.Since my wrap file for
opentelemetry-cpp
uses the tar-ball as a source (I know I can alter this, but bear with me), I "don't have access to" the Git submodules the project uses for its dependencies on the libraries mentioned above. I would also like to provision them using Meson for the dependency fetching/resolution.The question then becomes: how do I let CMake know where to find these libraries?
For Protobuf I can specify
Protobuf_LIBRARIES
andProtobuf_INCLUDE_DIR
using the options passable to thecmake.subproject()
function, but getting the location from the dependency object (returned from my call todependency('protobuf')
) seems impossible, as no method on the dependency object returns the library path or include directory path. I believe the other libraries' dependencies are solvable in the same fashion.I know I'm probably not going about this most straightforwardly, and maybe the better approach would've been for me to write a
meson.build
file foropentelemetry-cpp
instead. The only problem is that I don't particularly want to maintain said file, nor do I think I will get it 100% correct.Is what I'm asking about here impossible, or am I simply unable to find the correct page in the documentation?
Thanks in advance for your help ❤️
Beta Was this translation helpful? Give feedback.
All reactions