Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install files under <src_dir>/library/simulink-library/MomentumVelocityControl/src in <install_prefix>/mex/+wbc/simulink/MomentumVelocityControl to simplify use from install #141

Merged
merged 2 commits into from
Dec 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions library/simulink-library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ macro(INSTALL_SUBLIBMFILES curdir)
if(IS_DIRECTORY ${curdir}/${child})
# This applies to the folders inside this directory <sublib_dir>/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 <sublib_dir>/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)
Expand Down
4 changes: 4 additions & 0 deletions library/simulink-library/MomentumVelocityControl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<install_prefix>/mex/+wbc/simulink` and `<install_prefix>/mex/+wbc/simulink/MomentumVelocityControl` to the matlab path, the momentum velocity control library will be available in the simulink library browser.