From c8fdb2c1e0b73f041118bfca9a07f444d0f1726f Mon Sep 17 00:00:00 2001 From: hbristow Date: Sun, 23 Jun 2013 13:54:54 -0700 Subject: [PATCH] Changed build locations so that the matlab module can be used in-place, without having to install --- modules/matlab/CMakeLists.txt | 4 ++-- modules/matlab/compile.cmake | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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?