Closed colombojrj closed 7 months ago
Hm, matio has a thoroughly tested CMake configuration. Binaries are alo is available from ConanCenter together with its dependencies zlib and hdf5. Also eigen is available there.
Thanks. It's available from https://github.com/tbeu/matio-eigen-example now.
Hi,
I opened this as an issue because other people may want to use this cmake script at Windows. I believe many users (just as myself) do not care about organizing cmake or compiling dependencies or correct placing files just to the compiler to be happy. We only want to use this beautiful piece of code (matio). To do that, I wrote a small cmake script to help.
Before starting:
Now, create some folder where you want to keep your project. Inside that folder, create a file named CMakeLists.txt and copy and paste the following into it:
You may create a main.cpp file with the following content:
It will try to load a scalar variable named "alpha" from a file "data.mat".
I have spent many hours of my life trying to make this complete script that just works. I hope it helps someone.