Add RPATH to fix mujoco_studio library loading error on Linux.
PiperOrigin-RevId: 934768602 Change-Id: I0b54ee1b3ed1a1ed85bcc88b36443539056275b1
This commit is contained in:
committed by
Copybara-Service
parent
4ec843d70d
commit
0dc37fd77b
@@ -109,6 +109,19 @@ if(NOT EMSCRIPTEN)
|
||||
endif()
|
||||
target_sources(mujoco_studio PRIVATE main.cc)
|
||||
configure_studio_target(mujoco_studio)
|
||||
if(NOT (APPLE AND MUJOCO_BUILD_MACOS_FRAMEWORKS))
|
||||
include(TargetAddRpath)
|
||||
target_add_rpath(
|
||||
TARGETS
|
||||
mujoco_studio
|
||||
INSTALL_DIRECTORY
|
||||
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}"
|
||||
LIB_DIRS
|
||||
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
|
||||
DEPENDS
|
||||
MUJOCO_ENABLE_RPATH
|
||||
)
|
||||
endif()
|
||||
install(
|
||||
TARGETS mujoco_studio
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT studio
|
||||
|
||||
Reference in New Issue
Block a user