Description: get the matching mex extension
 Matlabs script $MATLABROOT/bin/mexext fails in an chrooted environment.
 .
Author: Ivo Maintz <ivo@maintz.de>

---
Last-Update: <2013-03-14>

--- libsbml-5.8.0.orig/src/bindings/matlab/FindMatlab.cmake
+++ libsbml-5.8.0/src/bindings/matlab/FindMatlab.cmake
@@ -162,7 +162,7 @@ IF(WIN32)
   SET(MATLAB_MATLAB_COMMAND "${MATLAB_ROOT_PATH}/bin/matlab.bat")
 ELSE (WIN32)
 	SET(MATLAB_MEX_COMMAND "${MATLAB_ROOT_PATH}/bin/mex")
-	SET(MATLAB_MEXEXT ${MATLAB_ROOT_PATH}/bin/mexext)
+	SET(MATLAB_MEXEXT "${CMAKE_SOURCE_DIR}/debian/bin/mexext")
 	SET(MATLAB_MATLAB_COMMAND "${MATLAB_ROOT_PATH}/bin/matlab")
 	MESSAGE(STATUS ${MATLAB_ROOT_PATH}/bin/maci64/)
 	if(APPLE)
