Skip to content

Commit

Permalink
Fix compilation when building zenohc in debug mode. (#166)
Browse files Browse the repository at this point in the history
When zenohc is built in debug mode, it actually changes
the name of the zenohcConfig.cmake file to zenohc_debugConfig.cmake.
Luckily it does not change the name of the library.

To deal with this, first quietly look for the debug version.
If we don't find that, then fall back to the release version.
This should make it compile in both circumstances.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored May 2, 2024
1 parent fa9397c commit 394ae20
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rmw_zenoh_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ find_package(rosidl_typesupport_fastrtps_cpp REQUIRED)
find_package(rmw REQUIRED)
find_package(rmw_dds_common REQUIRED)
find_package(zenoh_c_vendor REQUIRED)
find_package(zenohc REQUIRED)
find_package(zenohc_debug QUIET)
if(NOT zenohc_debug_FOUND)
find_package(zenohc REQUIRED)
endif()

add_library(rmw_zenoh_cpp SHARED
src/detail/attachment_helpers.cpp
Expand Down

0 comments on commit 394ae20

Please sign in to comment.