ami-iit / matio-cpp

A C++ wrapper of the matio library, with memory ownership handling, to read and write .mat files.
https://ami-iit.github.io/matio-cpp/
BSD 2-Clause "Simplified" License
59 stars 9 forks source link

Support finding visit_struct in the system also if it is installed without any CMake config file #70

Closed traversaro closed 1 year ago

traversaro commented 1 year ago

This PR permits to build matio-cpp when visit_struct is installed, but no CMake config for it is installed (for example as it happens when visit_struct is installed via vcpkg or by manually copying the headers).

Furthermore, I also fixed the logic of USE_SYSTEM_visit_struct, as as it was before this PR, even if the user explicitly set USE_SYSTEM_visit_struct, the build silently went back to the USE_SYSTEM_visit_struct set to OFF case, instead of giving an error.