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

pkg-config: compute relative path to prefix #587

Merged
merged 1 commit into from
Mar 29, 2023
Merged

Conversation

nim65s
Copy link
Collaborator

@nim65s nim65s commented Mar 29, 2023

instead of hardcoding ../...
Specially useful for ROS which sets LIBDIR to lib/x86_64-linux-gnu

fix: coal-library/coal#392
fix: stack-of-tasks/pinocchio#1524 (2023 comments)

instead of hardcoding "../..".
Specially useful for ROS which sets LIBDIR to "lib/x86_64-linux-gnu"

fix: coal-library/coal#392
fix: stack-of-tasks/pinocchio#1524 (2023 comments)
@jcarpent jcarpent merged commit 505d53d into master Mar 29, 2023
@nim65s nim65s deleted the topic/pc-rel branch March 29, 2023 12:09
nim65s added a commit that referenced this pull request Mar 29, 2023
with `REL_INV_INSTALL_PATH(FILE VARIABLE)` to compute the relative
inverse install path of `FILE` and store it into `VARIABLE`

eg:

```
rel_inv_install_path("${CMAKE_INSTALL_LIBDIR}/pkgconfig" _PC_REL_INV_INSTALL_PATH)
set(_PKG_CONFIG_PREFIX "\${pcfiledir}/${_PC_REL_INV_INSTALL_PATH}")
```

and `LIB_REL_RPATH(TARGET_INSTALL_DIR VARIABLE)` to compute the relative
path from this `TARGET_INSTALL_DIR` to `CMAKE_INSTALL_LIBDIR`."

eg:
```
set(${PYWRAP}_INSTALL_DIR ${PYTHON_SITELIB}/${PROJECT_NAME})

if(UNIX)
  lib_rel_rpath(${${PYWRAP}_INSTALL_DIR} ${PYWRAP}_INSTALL_RPATH)
  set_target_properties(${PYWRAP} PROPERTIES INSTALL_RPATH "${${PYWRAP}_INSTALL_RPATH}")
endif()

install(TARGETS ${PYWRAP} DESTINATION ${${PYWRAP}_INSTALL_DIR})
```

fix. stack-of-tasks/eigenpy#353
ref. #587
@nim65s nim65s mentioned this pull request Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants