diff --git a/examples/cells/CMakeLists.txt b/examples/cells/CMakeLists.txt index 2275d27..22be15e 100644 --- a/examples/cells/CMakeLists.txt +++ b/examples/cells/CMakeLists.txt @@ -10,13 +10,21 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) find_package(Python3 REQUIRED COMPONENTS Interpreter Development) # Find VTK -find_package(VTK COMPONENTS CommonCore QUIET) -if(VTK_FOUND) - find_package(VTK REQUIRED COMPONENTS CommonCore RenderingCore RenderingOpenGL2 WrappingPythonCore) -else() +foreach(_core_module vtkCommonCore CommonCore) + find_package(VTK COMPONENTS ${_core_module} QUIET) + if(VTK_FOUND) + break() + endif() +endforeach() + +if(VTK_VERSION VERSION_LESS 9.0.0) find_package(VTK REQUIRED COMPONENTS vtkCommonCore vtkRenderingCore vtkRenderingOpenGL2 vtkWrappingPythonCore) +else() + find_package(VTK REQUIRED COMPONENTS CommonCore RenderingCore RenderingOpenGL2 WrappingPythonCore) endif() +message(STATUS "VTK version: ${VTK_VERSION}") + # Find PETSc find_package(PETSc REQUIRED) diff --git a/examples/cells/conda-recipe/build.sh b/examples/cells/conda-recipe/build.sh new file mode 100644 index 0000000..a1c55e8 --- /dev/null +++ b/examples/cells/conda-recipe/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash -ex + +$PYTHON -m pip install . diff --git a/examples/cells/conda-recipe/meta.yaml b/examples/cells/conda-recipe/meta.yaml new file mode 100644 index 0000000..d686744 --- /dev/null +++ b/examples/cells/conda-recipe/meta.yaml @@ -0,0 +1,36 @@ +{% set version = "0.0.1" %} +{% set build = 0 %} + +package: + name: pycells + version: {{ version }} + +source: + path: .. + +build: + number: {{ build }} + +requirements: + build: + - cmake + - ninja + - pip + - python + - scikit-build + - setuptools + + host: + - mpi4py + - mpich + - petsc + - petsc4py + - python + - vtk + +test: + imports: + - pycells + +about: + license: BSD-3-Clause