Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake issue with jsoncpp_lib ALIAS target #384

Open
marip8 opened this issue Jan 30, 2024 · 3 comments
Open

CMake issue with jsoncpp_lib ALIAS target #384

marip8 opened this issue Jan 30, 2024 · 3 comments

Comments

@marip8
Copy link
Contributor

marip8 commented Jan 30, 2024

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.

add_library(jsoncpp_lib ALIAS JsonCpp::JsonCpp)

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

@rjoomen
Copy link
Contributor

rjoomen commented Jan 30, 2024

See also #298

@Levi-Armstrong
Copy link
Contributor

What impact does this have on those running 20.04?

@marip8
Copy link
Contributor Author

marip8 commented Feb 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants