Lines 16-24
Link Here
|
16 |
|
16 |
|
17 |
find_program(OCT_CMD mkoctfile) |
17 |
find_program(OCT_CMD mkoctfile) |
18 |
|
18 |
|
19 |
get_property(FLANN_LIB_LOCATION TARGET flann_s PROPERTY LOCATION) |
|
|
20 |
get_filename_component(FLANN_LIB_PATH ${FLANN_LIB_LOCATION} PATH) |
21 |
|
22 |
if(MEX_CMD AND MEXEXT_CMD) |
19 |
if(MEX_CMD AND MEXEXT_CMD) |
23 |
|
20 |
|
24 |
get_filename_component(MEX_REAL_CMD ${MEX_CMD} ABSOLUTE) |
21 |
get_filename_component(MEX_REAL_CMD ${MEX_CMD} ABSOLUTE) |
Lines 48-54
Link Here
|
48 |
ADD_CUSTOM_COMMAND( |
45 |
ADD_CUSTOM_COMMAND( |
49 |
OUTPUT ${MEX_FILE} |
46 |
OUTPUT ${MEX_FILE} |
50 |
COMMAND ${MEX_REAL_CMD} |
47 |
COMMAND ${MEX_REAL_CMD} |
51 |
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${MEX_NAME}.cpp -I${PROJECT_SOURCE_DIR}/src/cpp -L${FLANN_LIB_PATH} -lflann_s ${MEX_BUILD_FLAGS} |
48 |
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${MEX_NAME}.cpp -I${PROJECT_SOURCE_DIR}/src/cpp -L${PROJECT_BINARY_DIR}/lib -lflann_s ${MEX_BUILD_FLAGS} |
52 |
DEPENDS flann_s ${CMAKE_CURRENT_SOURCE_DIR}/${MEX_NAME}.cpp |
49 |
DEPENDS flann_s ${CMAKE_CURRENT_SOURCE_DIR}/${MEX_NAME}.cpp |
53 |
COMMENT "Building MEX extension ${MEX_FILE}" |
50 |
COMMENT "Building MEX extension ${MEX_FILE}" |
54 |
) |
51 |
) |
Lines 71-77
Link Here
|
71 |
ADD_CUSTOM_COMMAND( |
68 |
ADD_CUSTOM_COMMAND( |
72 |
OUTPUT ${MEX_FILE} |
69 |
OUTPUT ${MEX_FILE} |
73 |
COMMAND ${OCT_CMD} |
70 |
COMMAND ${OCT_CMD} |
74 |
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${MEX_NAME}.cpp -I${PROJECT_SOURCE_DIR}/src/cpp -L${FLANN_LIB_PATH} -DFLANN_STATIC -lflann_s -lgomp |
71 |
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${MEX_NAME}.cpp -I${PROJECT_SOURCE_DIR}/src/cpp -L${PROJECT_BINARY_DIR}/lib -DFLANN_STATIC -lflann_s -lgomp |
75 |
DEPENDS flann_s ${CMAKE_CURRENT_SOURCE_DIR}/${MEX_NAME}.cpp |
72 |
DEPENDS flann_s ${CMAKE_CURRENT_SOURCE_DIR}/${MEX_NAME}.cpp |
76 |
COMMENT "Building MEX extension ${MEX_FILE}" |
73 |
COMMENT "Building MEX extension ${MEX_FILE}" |
77 |
) |
74 |
) |