rohanpsingh / mc_mujoco

MuJoCo interface for mc-rtc
https://arxiv.org/abs/2209.00274
BSD 2-Clause "Simplified" License
81 stars 18 forks source link

MC_MUJOCO_SHARE_DESTINATION #45

Closed fkanehiro closed 1 year ago

fkanehiro commented 1 year ago

When I want to install mc_mujoco under my home directory, it seems that I need to change CMAKE_INSTALL_PREFIX and MC_MUJOCO_SHARE_DESTINATION. Is it necessary to make them configurable independently?

rohanpsingh commented 1 year ago

When I want to install mc_mujoco under my home directory, it seems that I need to change CMAKE_INSTALL_PREFIX and MC_MUJOCO_SHARE_DESTINATION.

Really? In my case, only CMAKE_INSTALL_PREFIX is needed to be set. MC_MUJOCO_SHARE_DESTINATION is set automatically.

fkanehiro commented 1 year ago

Maybe you specified CMAKE_INSTALL_PREFIX using -D option of cmake. I ran cmake without specifying CMAKE_INSTALL_PREFIX and then changed CMAKE_INSTALL_PREFIX using ccmake.

rohanpsingh commented 1 year ago

Ah I see, yes I was using the -D option. I think we don't need to make MC_MUJOCO_SHARE_DESTINATION separately configurable as it is only used for storing xml models.

gergondet commented 1 year ago

That's because the variable were set as CACHE variable rather than regular variable and updating CMAKE_INSTALL_PREFIX after the first CMake run would not update them. I have made them regular variables in the above commit.

@fkanehiro note that mc_mujoco is available in https://github.com/mc-rtc/superbuild-extensions/ (but there is a little extra work to do to support MuJoCo on macOS automatically: https://github.com/mc-rtc/superbuild-extensions/blob/main/simulation/MuJoCo.cmake)

fkanehiro commented 1 year ago

Thanks, @gergondet !