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

Matlab bindings: support 2020a, use matlab_add_mex and remove debug postfix for mex matlab_add_mex #664

Merged
merged 3 commits into from
Apr 1, 2020
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [1.0.3] - 2020-04-01

### Fixed
- Fixed configuration and compilation with Assimp >= 5.0.0 .
- Fixed configuration and compilation with Assimp >= 5.0.0 (https://github.com/robotology/idyntree/pull/661).
- Fixed runtime errors of the MATLAB bindings on Windows and compatibility with MATLAB 2020a (https://github.com/robotology/idyntree/pull/664).

## [1.0.2] - 2020-02-21

Expand Down
14 changes: 8 additions & 6 deletions bindings/matlab/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ macro(SWIG_GENERATE_MODULE name language)
endforeach()
endmacro()

macro(SWIG_COMPILE_MODULE name language)
macro(SWIG_COMPILE_MODULE_MEX name language)
SWIG_MODULE_INITIALIZE(${name} ${language})
add_library(${SWIG_MODULE_${name}_REAL_NAME}
MODULE
${swig_generated_sources}
${swig_other_sources})
matlab_add_mex(NAME ${SWIG_MODULE_${name}_REAL_NAME}
MODULE
SRC ${swig_generated_sources}
${swig_other_sources})
# Avoid the "d" suffix for mex files as it prevents the bindings to call the mex file correctly
set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES DEBUG_POSTFIX "")
endmacro()

# Options related to installation directories
Expand Down Expand Up @@ -89,7 +91,7 @@ if(IDYNTREE_USES_MATLAB)
MX_LIBRARY
MAIN_PROGRAM)

swig_compile_module(${mexname} matlab)
swig_compile_module_mex(${mexname} matlab)
swig_link_libraries(${mexname} ${Matlab_LIBRARIES} ${IDYNTREE_LIBRARIES} idyntree-core)
target_include_directories(${mexname} PUBLIC ${Matlab_INCLUDE_DIRS})

Expand Down
Loading