Skip to content

Commit

Permalink
Automatically installs robot models in the robots directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmurooka committed Aug 5, 2023
1 parent 87e4c7d commit 0726a63
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion robots/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/jvrc_mj_description/CMakeLists.txt")
message(FATAL_ERROR "No CMakeLists.txt in jvrc_mj_description folder, did you run `git submodule update --init`?")
endif()
add_subdirectory(jvrc_mj_description)

file(GLOB robot_dirs CONFIGURE_DEPENDS "*")
foreach(robot_dir ${robot_dirs})
if(EXISTS "${robot_dir}/CMakeLists.txt")
message(STATUS "Adding robot: ${robot_dir}")
add_subdirectory(${robot_dir})
endif()
endforeach()

function(setup_env_object NAME ENV_OBJECT)
set(YAML_OUT "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.yaml")
Expand Down

0 comments on commit 0726a63

Please sign in to comment.