TinyMAT
a library to write Matlab MAT-files
|
This page explains how to build TinyMAT.
The preferred way to build TinyMAT is using CMake. You can find a detailed explanation of CMake at https://cliutils.gitlab.io/modern-cmake/. The CMake-build is defined in CMakeLists.txt
files, found in many of the directories of the code repository. Especially in the root directory and the two subdirectories ./src/ and
./examples/ .
You can use (MinGW) Makefiles by calling:
Note that we set several compiler options on the first run of cmake. The options are describe in detail below in Configuring a Build with CMake .
For Visual Studio it could look like this:
Where <path_to_your_qt_sources> could be e.g.
C:/development/Qt5/5
.12.0/msvc2017_64 . This call results in a Visual Studio solution build/TinyMAT.sln
that you can load and compile from the Visual Studio IDE. Alternatively you can also build the solution directly calling:
Afterwards you can install the library by
The CMake build system offers several configuration variables that you may set/change to modify the outcome of the build:
CMAKE_PREFIX_PATH
: add the path to your Qt installatrion to this variable, so the find_package(Qt5...)
commands find the libraries you want to useBUILD_SHARED_LIBS
: Build as static library (default: OFF
)TinyMAT_BUILD_DECORATE_LIBNAMES_WITH_BUILDTYPE
: If set, the build-type is appended to the library name (default: ON
)TinyMAT_QT_SUPPORT
: build with support for Qt5/6 datatypes ... you'll need to make sure that Qt5/6 can be found on your system, e.g. by providing CMAKE_PREFIX_PATH=
<path_to_your_qt_sources>TinyMAT_OPENCV_SUPPORT
: enables support for OpenCV ... you'll need to make sure that Open can be found on your system, e.g. by providing CMAKE_PREFIX_PATH=
<path_to_your_opencv_sources>TinyMAT_BUILD_EXAMPLES
: Build examples (default: ON
)CMAKE_INSTALL_PREFIX
: Install directory for the library