diff --git a/modules/matlab/CMakeLists.txt b/modules/matlab/CMakeLists.txt index 94d580a122..3963558d15 100644 --- a/modules/matlab/CMakeLists.txt +++ b/modules/matlab/CMakeLists.txt @@ -181,7 +181,7 @@ add_dependencies(${the_module} ${the_module}_sources ${${the_module}_ACTUAL_DEPS file(GLOB MATLAB_FUNCTIONS "${CMAKE_CURRENT_BINARY_DIR}/src/*.${MATLAB_MEXEXT}") file(GLOB MATLAB_CLASSES "${CMAKE_CURRENT_BINARY_DIR}/+cv/*.m") file(GLOB MATLAB_PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/src/private/*.${MATLAB_MEXEXT}") -install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/src/ +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/+cv/ DESTINATION ${CMAKE_INSTALL_PREFIX}/matlab/+cv FILES_MATCHING PATTERN "*.${MATLAB_MEXEXT}" ) @@ -189,7 +189,7 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/+cv/ DESTINATION ${CMAKE_INSTALL_PREFIX}/matlab/+cv FILES_MATCHING PATTERN "*.m" ) -install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/src/private/ +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/+cv/private/ DESTINATION ${CMAKE_INSTALL_PREFIX}/matlab/+cv/private FILES_MATCHING PATTERN "*.${MATLAB_MEXEXT}" ) diff --git a/modules/matlab/compile.cmake b/modules/matlab/compile.cmake index 991ce4f278..0d9139333c 100644 --- a/modules/matlab/compile.cmake +++ b/modules/matlab/compile.cmake @@ -11,7 +11,7 @@ foreach(SOURCE_FILE ${SOURCE_FILES}) execute_process( COMMAND ${MATLAB_MEX_SCRIPT} ${MEX_OPTS} ${MEX_INCLUDE_DIRS_LIST} ${MEX_LIB_DIR} ${MEX_LIBS} ${SOURCE_FILE} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/src + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/+cv ERROR_VARIABLE FAILED ) # TODO: If a mex file fails to cmpile, should we error out?