In that folder, I can then do a
Hey MATLAB guys,
Excellent work. I was able to compile my wrapper on linux without any real problems. Given this success I am nearly 100% sure that it will work out fine on windows and OSX too.
For posterity, here is the plan:
git clone -b matlab https://github.com/KrisThielemans/swig
./configure --with-matlab=/usr/local/MATLAB/R2014a/bin/matlab --prefix=/home/ian/swig-matlab
git clone https://github.com/CoolProp/CoolProp
mkdir -p CoolProp/build/matlab && cd CoolProp/build/matlab
PATH=/home/ian/swig-matlab/bin:$PATH cmake ../.. -DCOOLPROP_MATLAB_SWIG_MODULE=ON
cmake --build .
I had to modify FindSWIG.cmake to get it to look for swig3.0 so that it would find my SWIG instead of the system swig. Otherwise, no problem. Much nicer using CMake than fighting with the nightmare that is MEX. Especially for larger programs with nested source folders, etc.
T = CoolProp.PropsSI('T','P','101325,'Q',0,'Water')
Water = CoolProp.AbstractState.factory('HEOS','Water')
Water.update(CoolProp.PT_INPUTS, 101325, 300)
T = Water.T()
rhomolar = Water.rhomolar()
all of which work fine. So that shows that static functions work, enums work, access of class methods work, etc. I'm sold.