I think the FindMatlab module shipped with CMake cannot look for only specific MATLAB tools/libraries. In particular, it does not look for the MATLAB Compiler Runtime (MCR) library. The IRTK should not link to the MATLAB libraries directly, but the MCR proxy library instead such that users don't need a MATLAB installation to run the code, only a free copy of the MCR.
The FindMATLAB module I wrote for CMake BASIS would be a better candidate.
Usage:
find_package(MATLAB COMPONENTS mwmclmcrrt)
include_directories("${MATLAB_INCLUDE_DIR}")
add_library(foo ...)
target_link_libraries(foo ${MATLAB_mwmclmcrrt_LIBRARY})
I think the FindMatlab module shipped with CMake cannot look for only specific MATLAB tools/libraries. In particular, it does not look for the MATLAB Compiler Runtime (MCR) library. The IRTK should not link to the MATLAB libraries directly, but the MCR proxy library instead such that users don't need a MATLAB installation to run the code, only a free copy of the MCR.
The FindMATLAB module I wrote for CMake BASIS would be a better candidate.
Usage: