diff options
Diffstat (limited to 'src/bindings/matlab/CMakeLists.txt')
-rw-r--r-- | src/bindings/matlab/CMakeLists.txt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/bindings/matlab/CMakeLists.txt b/src/bindings/matlab/CMakeLists.txt new file mode 100644 index 0000000..4eea7d5 --- /dev/null +++ b/src/bindings/matlab/CMakeLists.txt @@ -0,0 +1,26 @@ +find_program( + MATLAB_EXECUTABLE + NAMES matlab + DOC "Matlab main program" +) +mark_as_advanced(MATLAB_EXECUTABLE) + +option(WITH_MATLAB_BINDINGS_API "Enable MATLAB bindings API" ON) + +if (MATLAB_EXECUTABLE AND NOT SKIP_INSTALL_ALL) + option(MATLAB_BINDINGS "Install MATLAB bindings" ON) + + if (MATLAB_BINDINGS) + install( + DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/libiio" + PATTERN "CMakeLists.txt" EXCLUDE + ) + install( + CODE "execute_process( + COMMAND ${MATLAB_EXECUTABLE} -nodesktop + -nodisplay -r \"cd('${CMAKE_INSTALL_PREFIX}/share/libiio/matlab');iio_installer_script;exit;\" + OUTPUT_QUIET)") + set(WITH_MATLAB_BINDINGS_API ON CACHE BOOL "" FORCE) + endif() +endif() |