Skip to content

Commit

Permalink
Fix CMake < 3.24 configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored Jan 16, 2024
1 parent 5b14811 commit e967b0d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bindings/matlab/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ macro(GET_LIBRARY_FROM_SWIG_WRAPPER i_main_file i_other_files target_name genera
PROPERTY SWIG_DEPENDS ${i_other_files})
else()
if(${target_name} STREQUAL "iDynTreeMEX")
matlab_add_mex(NAME ${target_name} NO_IMPLICIT_LINK_TO_MATLAB_LIBRARIES SRC ${swig_generated_sources})
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24")
matlab_add_mex(NAME ${target_name} NO_IMPLICIT_LINK_TO_MATLAB_LIBRARIES SRC ${swig_generated_sources})
else()
matlab_add_mex(NAME ${target_name} SRC ${swig_generated_sources})
endif()
else()
add_library(${target_name} MODULE ${swig_generated_sources})
endif()
Expand Down

0 comments on commit e967b0d

Please sign in to comment.