Skip to content

Commit a873414

Browse files
committed
Mujoco plugin's cmake build fixed when no tests are define
Signed-off-by: Shivang <shivangso23@iitk.ac.in>
1 parent 594c42f commit a873414

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

mujoco/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,7 @@ foreach(test ${tests})
4141
"mujoco_plugin_LIB=\"$<TARGET_FILE:${plugin_target}>\"")
4242

4343
# Helps when we want to build a single test after making changes to mujoco_plugin
44-
add_dependencies(${test} ${mujoco_plugin})
44+
if(TARGET ${test} AND TARGET ${plugin_target})
45+
add_dependencies(${test} ${plugin_target})
46+
endif()
4547
endforeach()

0 commit comments

Comments
 (0)