Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 835021
Collapse All | Expand All

(-)a/src/matlab/CMakeLists.txt (-13 / +17 lines)
Lines 63-81 if(MEX_CMD AND MEXEXT_CMD) Link Here
63
        set(BUILD_MATLAB_BINDINGS OFF) 
63
        set(BUILD_MATLAB_BINDINGS OFF) 
64
    endif()
64
    endif()
65
elseif(OCT_CMD)
65
elseif(OCT_CMD)
66
  SET(MEX_FILE ${CMAKE_CURRENT_BINARY_DIR}/${MEX_NAME}.oct)
67
  ADD_CUSTOM_COMMAND(
68
    OUTPUT ${MEX_FILE}
69
    COMMAND ${OCT_CMD}
70
    ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${MEX_NAME}.cpp -I${PROJECT_SOURCE_DIR}/src/cpp -L${PROJECT_BINARY_DIR}/lib -DFLANN_STATIC -lflann_s -lgomp
71
    DEPENDS flann_s ${CMAKE_CURRENT_SOURCE_DIR}/${MEX_NAME}.cpp
72
    COMMENT "Building MEX extension ${MEX_FILE}"
73
    )
74
75
  ADD_CUSTOM_TARGET(mex_${MEX_NAME} ALL DEPENDS ${MEX_FILE})
76
77
  FILE(GLOB MATLAB_SOURCES *.m)
78
79
  find_program(OCTAVE_CONFIG_EXECUTABLE NAMES octave-config)
66
  find_program(OCTAVE_CONFIG_EXECUTABLE NAMES octave-config)
80
67
81
  if (OCTAVE_CONFIG_EXECUTABLE)
68
  if (OCTAVE_CONFIG_EXECUTABLE)
Lines 87-94 elseif(OCT_CMD) Link Here
87
                      OUTPUT_VARIABLE OCTAVE_OCT_SITE_DIR
74
                      OUTPUT_VARIABLE OCTAVE_OCT_SITE_DIR
88
                      OUTPUT_STRIP_TRAILING_WHITESPACE)
75
                      OUTPUT_STRIP_TRAILING_WHITESPACE)
89
76
77
    execute_process (COMMAND ${OCTAVE_CONFIG_EXECUTABLE} -p OCTLIBDIR
78
                      OUTPUT_VARIABLE OCTAVE_OCT_LIB_DIR
79
                      OUTPUT_STRIP_TRAILING_WHITESPACE)
80
90
  endif()
81
  endif()
91
82
83
  SET(MEX_FILE ${CMAKE_CURRENT_BINARY_DIR}/${MEX_NAME}.oct)
84
  ADD_CUSTOM_COMMAND(
85
    OUTPUT ${MEX_FILE}
86
    COMMAND ${OCT_CMD}
87
    ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${MEX_NAME}.cpp -I${PROJECT_SOURCE_DIR}/src/cpp -L${PROJECT_BINARY_DIR}/lib -DFLANN_STATIC -lflann_s -lgomp -L${OCTAVE_OCT_LIB_DIR}
88
    DEPENDS flann_s ${CMAKE_CURRENT_SOURCE_DIR}/${MEX_NAME}.cpp
89
    COMMENT "Building MEX extension ${MEX_FILE}"
90
    )
91
92
  ADD_CUSTOM_TARGET(mex_${MEX_NAME} ALL DEPENDS ${MEX_FILE})
93
94
  FILE(GLOB MATLAB_SOURCES *.m)
95
92
  INSTALL (FILES ${MEX_FILE} DESTINATION ${OCTAVE_OCT_SITE_DIR})
96
  INSTALL (FILES ${MEX_FILE} DESTINATION ${OCTAVE_OCT_SITE_DIR})
93
  INSTALL (FILES ${MATLAB_SOURCES} DESTINATION ${OCTAVE_M_SITE_DIR})
97
  INSTALL (FILES ${MATLAB_SOURCES} DESTINATION ${OCTAVE_M_SITE_DIR})
94
else()
98
else()

Return to bug 835021