trajopt icon indicating copy to clipboard operation
trajopt copied to clipboard

CMake issue with `jsoncpp_lib` ALIAS target

Open marip8 opened this issue 1 year ago • 3 comments

The following line fails for me with CMake 3.16.3, resulting in the error: add_library cannot create ALIAS target "jsoncpp_lib" because target "JsonCpp::JsonCpp" is imported but not globally visible.

https://github.com/tesseract-robotics/trajopt/blob/ac685dc2fc8d7050d54a7b6fce40422374f81ff5/trajopt_sco/cmake/trajopt_sco-config.cmake.in#L15

This error seems to go away with CMake >= 3.25.0 (possibly with an earlier version). This also corresponds to this reported issue.

I think the solution should be to update the minimum CMake version of all packages that perform the operation in the code snippet above (trajopt_sco, trajopt) to CMake >= 3.25.0

marip8 avatar Jan 30 '24 20:01 marip8

See also #298

rjoomen avatar Jan 30 '24 21:01 rjoomen

What impact does this have on those running 20.04?

Levi-Armstrong avatar Feb 07 '24 20:02 Levi-Armstrong

I encountered this issue on 20.04. Presumably anyone running CMake < 3.25.0 on any supported distro will run into this

marip8 avatar Feb 08 '24 17:02 marip8