Skip to content

Commit

Permalink
Merge pull request #19764 from traversaro/matiocpp
Browse files Browse the repository at this point in the history
Add recipe for libmatio-cpp
  • Loading branch information
carterbox authored Aug 28, 2022
2 parents 4ece800 + 6837f6d commit 41279a6
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
24 changes: 24 additions & 0 deletions recipes/matio-cpp/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
mkdir build
cd build

cmake ^
-G "Ninja" ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-DBUILD_TESTING:BOOL=ON ^
-DBUILD_SHARED_LIBS:BOOL=ON ^
-DUSE_SYSTEM_visit_struct:BOOL=ON ^
%SRC_DIR%
if errorlevel 1 exit 1

:: Build.
cmake --build . --config Release
if errorlevel 1 exit 1

:: Install.
cmake --build . --config Release --target install
if errorlevel 1 exit 1

:: Test.
ctest --output-on-failure -C Release
if errorlevel 1 exit 1
15 changes: 15 additions & 0 deletions recipes/matio-cpp/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

mkdir build
cd build

cmake ${CMAKE_ARGS} -GNinja .. \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING:BOOL=ON \
-DUSE_SYSTEM_visit_struct:BOOL=ON

cmake --build . --config Release
cmake --build . --config Release --target install
if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" != "1" || "${CROSSCOMPILING_EMULATOR}" != "" ]]; then
ctest --output-on-failure -C Release
fi
48 changes: 48 additions & 0 deletions recipes/matio-cpp/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{% set name = "libmatio-cpp" %}
{% set version = "0.2.1" %}

package:
name: {{ name }}
version: {{ version }}

source:
- url: https://github.com/ami-iit/matio-cpp/archive/refs/tags/v{{ version }}.tar.gz
sha256: a9144816e79f517b52593d2d934d6e727ff136495fee3b37d3eb6ebaf892b355

build:
number: 0
run_exports:
- {{ pin_subpackage(name, max_pin='x.x.x') }}

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- cmake
- pkg-config
- ninja
host:
- libmatio
- eigen
- visit_struct
- catch2

test:
commands:
- test -f $PREFIX/include/matioCpp/matioCpp.h # [unix]
- test -f $PREFIX/lib/libmatioCpp${SHLIB_EXT} # [unix]
- if not exist %LIBRARY_INC%\\matioCpp\\matioCpp.h exit 1 # [win]
- if not exist %LIBRARY_LIB%\\matioCpp.lib exit 1 # [win]
- if not exist %LIBRARY_BIN%\\matioCpp.dll exit 1 # [win]

about:
home: https://github.com/ami-iit/matio-cpp
license: BSD-2-Clause
license_file: LICENSE
summary: A C++ wrapper of the matio library, with memory ownership handling, to read and write .mat files.

extra:
recipe-maintainers:
- traversaro


0 comments on commit 41279a6

Please sign in to comment.