Skip to content

How to link and include zenoh-cpp in another project CMakeLists.txt? #103

Answered by milyin
lucasw asked this question in Q&A
Discussion options

You must be logged in to vote

The problem seems to be that zenoh-c was not included before. The zenoh-cpp is a wrapper for zenoh-c and zenoh-pico and can work without any of these components. If zenoh-c is missing, the target zenohcxx::zenohc::lib is not defined too. See https://github.com/eclipse-zenoh/zenoh-cpp/blob/main/CMakeLists.txt#40, same logic is in the installed package.

There is issue about insufficient diagnostic when required library is not included: eclipse-zenoh/zenoh-cpp#58

There are also few examples of simplest possible CMakeLists.txt's for zenoh-cpp: https://github.com/eclipse-zenoh/zenoh-cpp/tree/main/examples/simple

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lucasw
Comment options

Answer selected by lucasw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants