diff --git a/conda-recipe/vtkbone/bld.bat b/conda-recipe/vtkbone/bld.bat new file mode 100644 index 0000000..b22fb60 --- /dev/null +++ b/conda-recipe/vtkbone/bld.bat @@ -0,0 +1,23 @@ + +:: Create build directory +mkdir build +cd build +set BUILD_CONFIG=Release + +:: CMake +cmake .. ^ + -G "Ninja" ^ + -DCMAKE_BUILD_TYPE=%BUILD_CONFIG% ^ + -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ + -DBOOST_ROOT:PATH="%PREFIX%" ^ + -DENABLE_TESTING:BOOL=ON ^ + -DBUILD_SHARED_LIBS:BOOL=ON +if errorlevel 1 exit 1 + +:: Compile and install +ninja install +if errorlevel 1 exit 1 + +:: Run tests +ctest -V +if errorlevel 1 exit 1 diff --git a/conda-recipe/vtkbone/build.sh b/conda-recipe/vtkbone/build.sh new file mode 100644 index 0000000..3352523 --- /dev/null +++ b/conda-recipe/vtkbone/build.sh @@ -0,0 +1,41 @@ + +# Create build directory +mkdir build +cd build +BUILD_CONFIG=Release + +# Specify Python +case $(uname | tr '[:upper:]' '[:lower:]') in + linux*) + export PYTHON_LIBRARY="${PREFIX}/lib/libpython${PY_VER}.so" + export PYTHON_INCLUDE_DIR="${PREFIX}/include/python${PY_VER}" + ;; + darwin*) + export PYTHON_LIBRARY="${PREFIX}/lib/libpython${PY_VER}.dylib" + export PYTHON_INCLUDE_DIR="${PREFIX}/include/python${PY_VER}" + ;; + *) +esac + +# C/CXX Flags +export CFLAGS="-fPIC" +export CXXFLAGS="-fPIC" + +# CMake +cmake .. \ + -G "Ninja" \ + -DCMAKE_BUILD_TYPE=$BUILD_CONFIG \ + -DCMAKE_PREFIX_PATH:PATH="${PREFIX}" \ + -DCMAKE_INSTALL_PREFIX:PATH="${PREFIX}" \ + -DCMAKE_INSTALL_RPATH:PATH="${PREFIX}/lib" \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + -DBOOST_ROOT:PATH="${PREFIX}" \ + -DPYTHON_LIBRARY:FILEPATH="${PYTHON_LIBRARY}" \ + -DPYTHON_INCLUDE_DIR:PATH="${PYTHON_INCLUDE_DIR}" \ + -DENABLE_TESTING:BOOL=ON + +# Compile and install +ninja install -v + +# Run tests +ctest -V diff --git a/conda-recipe/vtkbone/meta.yaml b/conda-recipe/vtkbone/meta.yaml new file mode 100644 index 0000000..35687ee --- /dev/null +++ b/conda-recipe/vtkbone/meta.yaml @@ -0,0 +1,37 @@ + +package: + name: vtkbone + version: {{ GIT_DESCRIBE_TAG | lower | replace("v","") }} + +source: + path: ./../../ + +build: + number: 0 + +requirements: + build: + - cmake >=3.1.0 + - ninja + - gtest + - boost >=1.59 + - libnetcdf + - pqctio + - aimio + - vtk =6.3 + run: + - boost >=1.59 + - libnetcdf + - pqctio + - aimio + - vtk =6.3 + +about: + home: https://github.com/Numerics88/vtkbone + license: MIT + license_family: MIT + license_file: LICENSE + summary: 'VTK classes for bone FEA' + description: | + VTK classes for processing of finite element models derived from micro-CT. vtkbone was formerly vtkn88. + dev_url: https://github.com/Numerics88/vtkbone