| 1 | from conan import ConanFile |
| 2 | |
| 3 | class MatioConan(ConanFile): |
| 4 | name = 'matio' |
| 5 | version = '1.5.30' |
| 6 | license = 'BSD-2-Clause License' |
| 7 | description = 'Matio is a C library for reading and writing binary MATLAB MAT files.' |
| 8 | settings = 'os', 'compiler', 'build_type', 'arch' |
| 9 | generators = 'CMakeDeps' |
| 10 | options = { |
| 11 | 'shared': [True, False], |
| 12 | 'extended_sparse': [True, False], |
| 13 | 'fPIC': [True, False], |
| 14 | 'mat73': [True, False], |
| 15 | 'with_hdf5': [None, 'shared', 'static'], |
| 16 | 'with_zlib': [None, 'shared', 'static'], |
| 17 | } |
| 18 | default_options = { |
| 19 | 'shared': True, |
| 20 | 'extended_sparse': True, |
| 21 | 'fPIC': True, |
| 22 | 'mat73': True, |
| 23 | 'with_hdf5': 'shared', |
| 24 | 'with_zlib': 'shared', |
| 25 | } |
| 26 | |
| 27 | def requirements(self): |
| 28 | if self.options.with_hdf5 and 'Off' != self.conf.get('user.workaround.matio:with_hdf5', default='On'): |
| 29 | self.requires('hdf5/[>=1.8 <1.15]') |
| 30 | if self.options.with_zlib and 'Off' != self.conf.get('user.workaround.matio:with_zlib', default='On'): |
| 31 | self.requires('zlib/[>=1.2.3]') |