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

Fix installation directory of YARP python bindings #1763

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cmake/BuildYARP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ else()
endif()

if(ROBOTOLOGY_USES_PYTHON)
list(APPEND YARP_OPTIONAL_DEPS "-DCMAKE_INSTALL_PYTHON3DIR=${ROBOTOLOGY_SUPERBUILD_PYTHON_INSTALL_DIR}")
# Differently from other libraries, the `CMAKE_INSTALL_PYTHON3DIR` is a PATH CACHE variable,
# so if we pass a relative path, it gets automatically expanded to the absolute path w.r.t.
# to the current work directory where cmake is invoked, while we want it to be relative w.r.t.
# ${YCM_EP_INSTALL_DIR} (i.e. the variable that is passed as `CMAKE_INSTALL_PREFIX` to all projects)
file(TO_NATIVE_PATH "${YCM_EP_INSTALL_DIR}/${ROBOTOLOGY_SUPERBUILD_PYTHON_INSTALL_DIR}" ROBOTOLOGY_SUPERBUILD_PYTHON_FULL_INSTALL_DIR)
list(APPEND YARP_OPTIONAL_CMAKE_ARGS "-DCMAKE_INSTALL_PYTHON3DIR=${ROBOTOLOGY_SUPERBUILD_PYTHON_FULL_INSTALL_DIR}")
endif()

# Workaround for graphviz==9 failures with YARP <= 3.9
Expand Down
Loading