File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,15 @@ find_package(tf2_ros REQUIRED)
21
21
find_package (pcl_conversions REQUIRED )
22
22
find_package (ouster_msgs REQUIRED )
23
23
find_package (PCL REQUIRED COMPONENTS common )
24
- find_package (jsoncpp REQUIRED )
24
+ # Workaround for upstream JsonCpp bug:
25
+ # https://github.com/open-source-parsers/jsoncpp/issues/1356
26
+ # This checks if the JsonCpp::JsonCpp target already exists before
27
+ # trying to find the jsoncpp package again. This prevents the
28
+ # "cannot create imported target" CMake error when multiple
29
+ # dependencies try to find jsoncpp.
30
+ if (NOT TARGET JsonCpp::JsonCpp )
31
+ find_package (jsoncpp REQUIRED )
32
+ endif ()
25
33
26
34
include_directories (
27
35
include
@@ -67,7 +75,7 @@ ament_target_dependencies(${library_name}
67
75
)
68
76
69
77
target_link_libraries (${library_name}
70
- jsoncpp_lib
78
+ JsonCpp::JsonCpp
71
79
tins
72
80
${PCL_LIBRARIES}
73
81
)
You can’t perform that action at this time.
0 commit comments