Skip to content

Commit

Permalink
Fix installation directory of YARP python bindings (#1763)
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro committed Dec 9, 2024
1 parent 88cd280 commit d5f4e87
Showing 1 changed file with 6 additions and 1 deletion.
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

0 comments on commit d5f4e87

Please sign in to comment.