From eb5d04f9f22077254a1069c995d4813c5638d1e8 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Thu, 16 Dec 2021 18:13:10 +0100 Subject: [PATCH 1/2] Install files under library/simulink-library/MomentumVelocityControl/src in mex/+wbc/simulink/MomentumVelocityControl to simplify use from instal --- library/simulink-library/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/simulink-library/CMakeLists.txt b/library/simulink-library/CMakeLists.txt index 8f8a81f..6ef1691 100644 --- a/library/simulink-library/CMakeLists.txt +++ b/library/simulink-library/CMakeLists.txt @@ -24,12 +24,14 @@ macro(INSTALL_SUBLIBMFILES curdir) if(IS_DIRECTORY ${curdir}/${child}) # This applies to the folders inside this directory /src are assumed to contain matlab files file(GLOB m_files ${curdir}/${child}/*.m) - install(FILES ${m_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/mex/+wbc) + get_filename_component(curdir_no_path ${curdir} NAME) + install(FILES ${m_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/mex/+wbc/simulink/${curdir_no_path}) endif() endforeach() # The following applies to the matlab files inside this directory /src file(GLOB m_files_out ${curdir}/src/*.m) - install(FILES ${m_files_out} DESTINATION ${CMAKE_INSTALL_PREFIX}/mex/+wbc) + get_filename_component(curdir_no_path ${curdir} NAME) + install(FILES ${m_files_out} DESTINATION ${CMAKE_INSTALL_PREFIX}/mex/+wbc/simulink/${curdir_no_path}) endmacro() macro(INSTALL_SUBLIBS curdir) From ab3fa9ab3eefc27e59f00a4358138b942cfbc7b2 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Thu, 16 Dec 2021 18:14:27 +0100 Subject: [PATCH 2/2] Update README.md --- library/simulink-library/MomentumVelocityControl/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/simulink-library/MomentumVelocityControl/README.md b/library/simulink-library/MomentumVelocityControl/README.md index f17fd54..bdc2a06 100644 --- a/library/simulink-library/MomentumVelocityControl/README.md +++ b/library/simulink-library/MomentumVelocityControl/README.md @@ -9,6 +9,10 @@ Please download Casadi by following this [link](https://web.casadi.org/get/) and ## How to run +### From source repo + Add this folder to your matlab path, the momentum velocity control library will be available in the simulink library browser. +### From installed files +Add the `/mex/+wbc/simulink` and `/mex/+wbc/simulink/MomentumVelocityControl` to the matlab path, the momentum velocity control library will be available in the simulink library browser.