IF(MEX_COMPILER) MACRO(MEX FN) INCLUDE_DIRECTORIES(${MATLAB_INCLUDE_DIR} "${BDM_SOURCE_DIR}/bdm") LINK_DIRECTORIES("${BDM_SOURCE_DIR}/bdm") ADD_LIBRARY(${FN} MODULE ${FN}.cpp) set_target_properties(${FN} PROPERTIES PREFIX "" SUFFIX ".mexa64" ) TARGET_LINK_LIBRARIES(${FN} ${MATLAB_LIBRARIES} bdm itpp) ENDMACRO(MEX) MEX(merger_mx) EXEC(merger) MEX(config2mxstruct) MEX(mxstruct2config) ENDIF(MEX_COMPILER)