Skip to content

Replace join_paths with cmake_path(APPEND) #498

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

Draft
wants to merge 2 commits into
base: gz-cmake4
Choose a base branch
from

Conversation

scpeters
Copy link
Member

@scpeters scpeters commented May 1, 2025

🦟 Bug fix

Fixes a cleanup comment

Summary

There is a TODO comment suggesting that we use cmake_path(APPEND) when cmake 3.20 is required. Since Ionic uses cmake 3.22.1, we can make this change now.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Steve Peters <[email protected]>
cmake_path(APPEND "\${prefix}" "${CMAKE_INSTALL_LIBDIR}"
OUTPUT_VARIABLE GZ_PC_LIBDIR)
cmake_path(APPEND "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}" "${GZ_INCLUDE_INSTALL_DIR_POSTFIX}"
OUTPUT_VARIABLE GZ_PC_INCLUDEDIR)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't actually work the same

before this change gz-cmake4.pc has the following line:

includedir=${prefix}/include/gz/cmake4

and after this change it is

includedir=include/gz/cmake4

I think the first argument to cmake_path(APPEND needs to be a cmake variable, not an expression that is meant to be evaluated at pkg-config runtime. I'm not sure how to use cmake_path(APPEND in this case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏛️ ionic Gazebo Ionic 🪵 jetty Gazebo Jetty
Projects
Status: Inbox
Development

Successfully merging this pull request may close these issues.

1 participant