-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
27 lines (20 loc) · 1.22 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
cmake_minimum_required(VERSION 3.1)
project(jvrc1_mj_description VERSION 1.0.0)
if(NOT TARGET mc_mujoco)
find_package(mc_mujoco REQUIRED)
endif()
option(SRC_MODE "Use files in the repository instead of installed files" OFF)
set(JVRC1_XML_MODEL_PATH "xml/jvrc1.xml")
set(JVRC1_PDGAINS_PATH "pdgains/PDgains_sim.dat")
if(SRC_MODE)
set(JVRC1_XML_MODEL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${JVRC1_XML_MODEL_PATH}")
set(JVRC1_PDGAINS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${JVRC1_PDGAINS_PATH}")
else()
set(JVRC1_XML_MODEL_PATH "${MC_MUJOCO_SHARE_DESTINATION}/JVRC1/${JVRC1_XML_MODEL_PATH}")
set(JVRC1_PDGAINS_PATH "${MC_MUJOCO_SHARE_DESTINATION}/JVRC1/${JVRC1_PDGAINS_PATH}")
endif()
configure_file(mc_mujoco/jvrc1.in.yaml "${CMAKE_CURRENT_BINARY_DIR}/mc_mujoco/jvrc1.yaml")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/mc_mujoco/jvrc1.yaml" DESTINATION "${MC_MUJOCO_SHARE_DESTINATION}")
install(DIRECTORY meshes DESTINATION "${MC_MUJOCO_SHARE_DESTINATION}/JVRC1" FILES_MATCHING PATTERN "*.stl" PATTERN "*.obj" PATTERN "*.png")
install(DIRECTORY pdgains DESTINATION "${MC_MUJOCO_SHARE_DESTINATION}/JVRC1" FILES_MATCHING PATTERN "*.dat")
install(DIRECTORY xml DESTINATION "${MC_MUJOCO_SHARE_DESTINATION}/JVRC1" FILES_MATCHING PATTERN "*.xml")