tesseract-robotics / trajopt

Trajectory Optimization Motion Planner for ROS
381 stars 103 forks source link

Fix jsoncpp link targets and sparseview issue #299

Closed rjoomen closed 2 years ago

rjoomen commented 2 years ago

Fixes #289 and #298

rjoomen commented 2 years ago

Accidentally added two fixes to one PR, sorry.

Levi-Armstrong commented 2 years ago

It looks like the target is not present on Focal. I recommend doing the same things we are doing for console_bridge above in the cmake where we check for the target and if it does not exist we create one. This will also need to be added to the cmake config in the cmake folder.

Levi-Armstrong commented 7 months ago

@rjoomen I think this should be the following. Is there a reason why we are not always calling find_dependency; because I believe this is why we are having the global scope issue.

 find_dependency(jsoncpp)
 if(NOT TARGET jsoncpp_lib)
  add_library(jsoncpp_lib ALIAS JsonCpp::JsonCpp)