matlab module (Bug #3439)


Added by Pieter Eendebak about 11 years ago. Updated about 11 years ago.


Status:Cancelled Start date:2013-12-17
Priority:Normal Due date:
Assignee:Roman Donchenko % Done:

0%

Category:build/install
Target version:-
Affected version:branch 'master' (3.0-dev) Operating System:Linux
Difficulty: HW Platform:x64
Pull request:

Description

On Unix the matlab part of build system uses the OpenCV libraries from ${LIBRARY_OUTPUT_PATH}/$<CONFIGURATION>. However, the OpenCV libs are build in
${LIBRARY_OUTPUT_PATH}. This means the matlab part of the build system finds the global OpenCV libs (which on my system are the 2.4.x libs) and fails.

A patch with a simple solution is included below, but maybe a better solution is required.


diff --git a/modules/matlab/CMakeLists.txt b/modules/matlab/CMakeLists.txt
index dd5439d..6fbc3a0 100644
--- a/modules/matlab/CMakeLists.txt
+++ b/modules/matlab/CMakeLists.txt
@ -104,7 +104,7 @ set(RST_PARSER_PATH ${CMAKE_SOURCE_DIR}/modules/java/generator)

  1. set mex compiler options
    prepend("-I" MEX_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include)
    -prepend("-L" MEX_LIB_DIR ${LIBRARY_OUTPUT_PATH}/$<CONFIGURATION>)
    +prepend("-L" MEX_LIB_DIR ${LIBRARY_OUTPUT_PATH}/$<CONFIGURATION> ${LIBRARY_OUTPUT_PATH}/)
    set(MEX_OPTS "-largeArrayDims")
if (BUILD_TESTS)

Related issues

related to Bug #3440: PREPEND and MEX_LIB_DIR in Matlab module's CMakeLists.txt Done 2013-12-18

History

Updated by Roman Donchenko about 11 years ago

There is, in fact, a better solution: $<TARGET_FILE_DIR:opencv_matlab>. I don't have Matlab, though, so I can't test if it actually works. But if it does, submit us a pull request, and we'll merge it.

Updated by Alexander Shishkov about 11 years ago

  • Category set to build/install
  • Assignee set to Roman Donchenko

Updated by Hilton Bristow about 11 years ago

I'll have a look at this over the next week.

Updated by Anna Kogan about 11 years ago

  • Status changed from New to Open

Updated by Roman Donchenko about 11 years ago

Looks like a duplicate of #3440, which has already been fixed.

(I guess technically #3440 is the duplicate, but I've already marked that one as done. ;-))

  • Status changed from Open to Cancelled

Also available in: Atom PDF