Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recipe for libmatio-cpp #19764

Merged
merged 11 commits into from
Aug 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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