Changed build locations so that the matlab module can be used in-place, without having to install

pull/1384/head
hbristow 12 years ago
parent b0285d92b4
commit c8fdb2c1e0
  1. 4
      modules/matlab/CMakeLists.txt
  2. 2
      modules/matlab/compile.cmake

@ -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_FUNCTIONS "${CMAKE_CURRENT_BINARY_DIR}/src/*.${MATLAB_MEXEXT}")
file(GLOB MATLAB_CLASSES "${CMAKE_CURRENT_BINARY_DIR}/+cv/*.m") file(GLOB MATLAB_CLASSES "${CMAKE_CURRENT_BINARY_DIR}/+cv/*.m")
file(GLOB MATLAB_PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/src/private/*.${MATLAB_MEXEXT}") 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 DESTINATION ${CMAKE_INSTALL_PREFIX}/matlab/+cv
FILES_MATCHING PATTERN "*.${MATLAB_MEXEXT}" FILES_MATCHING PATTERN "*.${MATLAB_MEXEXT}"
) )
@ -189,7 +189,7 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/+cv/
DESTINATION ${CMAKE_INSTALL_PREFIX}/matlab/+cv DESTINATION ${CMAKE_INSTALL_PREFIX}/matlab/+cv
FILES_MATCHING PATTERN "*.m" 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 DESTINATION ${CMAKE_INSTALL_PREFIX}/matlab/+cv/private
FILES_MATCHING PATTERN "*.${MATLAB_MEXEXT}" FILES_MATCHING PATTERN "*.${MATLAB_MEXEXT}"
) )

@ -11,7 +11,7 @@ foreach(SOURCE_FILE ${SOURCE_FILES})
execute_process( execute_process(
COMMAND ${MATLAB_MEX_SCRIPT} ${MEX_OPTS} ${MEX_INCLUDE_DIRS_LIST} COMMAND ${MATLAB_MEX_SCRIPT} ${MEX_OPTS} ${MEX_INCLUDE_DIRS_LIST}
${MEX_LIB_DIR} ${MEX_LIBS} ${SOURCE_FILE} ${MEX_LIB_DIR} ${MEX_LIBS} ${SOURCE_FILE}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/src WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/+cv
ERROR_VARIABLE FAILED ERROR_VARIABLE FAILED
) )
# TODO: If a mex file fails to cmpile, should we error out? # TODO: If a mex file fails to cmpile, should we error out?

Loading…
Cancel
Save