Skip to content

Commit

Permalink
Merge pull request #110 from xylar/fix_system_libs_take_2
Browse files Browse the repository at this point in the history
DEV: Build with external libraries
  • Loading branch information
xylar authored Mar 25, 2020
2 parents ba02da5 + d9c4a23 commit f71bfed
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 38 deletions.
44 changes: 24 additions & 20 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,38 @@ cmake .. -G "Ninja" ^
-DCMAKE_INSTALL_DATAROOTDIR="Library/share" ^
-DCMAKE_INSTALL_PREFIX="%PREFIX%" ^
-DVTK_PYTHON_SITE_PACKAGES_SUFFIX="Lib/site-packages" ^
-DBUILD_DOCUMENTATION:BOOL=OFF ^
-DBUILD_TESTING:BOOL=OFF ^
-DBUILD_EXAMPLES:BOOL=OFF ^
-DBUILD_SHARED_LIBS:BOOL=ON ^
-DModule_vtkPythonInterpreter:BOOL=OFF ^
-DVTK_WRAP_PYTHON:BOOL=ON ^
-DVTK_PYTHON_VERSION:STRING="%PYTHON_MAJOR_VERSION%" ^
-DPython2_FIND_STRATEGY=LOCATION ^
-DPython2_ROOT_DIR="%PREFIX%" ^
-DPython3_FIND_STRATEGY=LOCATION ^
-DPython3_ROOT_DIR="%PREFIX%" ^
-DVTK_HAS_FEENABLEEXCEPT:BOOL=OFF ^
-DVTK_RENDERING_BACKEND=OpenGL2 ^
-DModule_vtkRenderingMatplotlib=ON ^
-DModule_vtkIOXdmf2:INTERNAL=ON ^
-DVTK_USE_SYSTEM_ZLIB:BOOL=ON ^
-DVTK_USE_SYSTEM_FREETYPE:BOOL=ON ^
-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON ^
-DVTK_USE_SYSTEM_PNG:BOOL=ON ^
-DVTK_USE_SYSTEM_JPEG:BOOL=ON ^
-DVTK_USE_SYSTEM_TIFF:BOOL=ON ^
-DVTK_USE_SYSTEM_EXPAT:BOOL=ON ^
-DVTK_USE_SYSTEM_HDF5:BOOL=ON ^
-DVTK_USE_SYSTEM_JSONCPP:BOOL=ON ^
-DVTK_USE_SYSTEM_NETCDF:BOOL=ON ^
-DVTK_USE_SYSTEM_LZ4:BOOL=ON ^
-DVTK_SMP_IMPLEMENTATION_TYPE:STRING=TBB ^
-DVTK_DATA_EXCLUDE_FROM_ALL=ON
-DVTK_DATA_EXCLUDE_FROM_ALL:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtkeigen:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtkdoubleconversion:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtklz4:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtkzlib:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtkexpat:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtkfreetype:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtkjpeg:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtkpng:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtktiff:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtkglew:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtkhdf5:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtkogg:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtktheora:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtkjsoncpp:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtklibxml2:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtklibproj:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtknetcdf:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtklzma:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtkloguru:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtksqlite:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtkutf8:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtkgl2ps:BOOL=ON ^
-DVTK_MODULE_USE_EXTERNAL_vtkpugixml:BOOL=ON
if errorlevel 1 exit 1

ninja install
Expand Down
47 changes: 33 additions & 14 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ cmake .. -G "Ninja" \
-DVTK_HAS_FEENABLEEXCEPT:BOOL=OFF \
-DVTK_WRAP_PYTHON:BOOL=ON \
-DVTK_PYTHON_VERSION:STRING="${PYTHON_MAJOR_VERSION}" \
-DPython2_FIND_STRATEGY=LOCATION \
-DPython2_ROOT_DIR=${PREFIX} \
-DPython3_FIND_STRATEGY=LOCATION \
-DPython3_ROOT_DIR=${PREFIX} \
-DVTK_MODULE_ENABLE_VTK_PythonInterpreter:STRING=NO \
Expand All @@ -82,20 +80,41 @@ cmake .. -G "Ninja" \
-DVTK_MODULE_ENABLE_VTK_RenderingContextOpenGL2:STRING=YES \
-DVTK_MODULE_ENABLE_VTK_RenderingCore:STRING=YES \
-DVTK_MODULE_ENABLE_VTK_RenderingOpenGL2:STRING=YES \
-DVTK_DATA_EXCLUDE_FROM_ALL=ON \
-DVTK_USE_SYSTEM_ZLIB:BOOL=ON \
-DVTK_USE_SYSTEM_FREETYPE:BOOL=ON \
-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON \
-DVTK_USE_SYSTEM_PNG:BOOL=ON \
-DVTK_USE_SYSTEM_JPEG:BOOL=ON \
-DVTK_USE_SYSTEM_TIFF:BOOL=ON \
-DVTK_USE_SYSTEM_EXPAT:BOOL=ON \
-DVTK_USE_SYSTEM_HDF5:BOOL=ON \
-DVTK_USE_SYSTEM_JSONCPP:BOOL=ON \
-DVTK_USE_SYSTEM_NETCDF:BOOL=ON \
-DVTK_USE_SYSTEM_LZ4:BOOL=ON \
-DVTK_DATA_EXCLUDE_FROM_ALL:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtkeigen:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtkdoubleconversion:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtklz4:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtkzlib:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtkexpat:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtkfreetype:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtkjpeg:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtkpng:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtktiff:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtkglew:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtkhdf5:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtkogg:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtktheora:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtkjsoncpp:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtklibxml2:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtklibproj:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtknetcdf:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtklzma:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtkloguru:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtksqlite:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtkutf8:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtkgl2ps:BOOL=ON \
-DVTK_MODULE_USE_EXTERNAL_vtkpugixml:BOOL=ON \
"${VTK_ARGS[@]}"

# third-party libraries we'd ideally replace but aren't on conda-forge yet
#-DVTK_MODULE_USE_EXTERNAL_vtklibharu:BOOL=ON \
#-DVTK_MODULE_USE_EXTERNAL_vtkdiy2:BOOL=ON \
#-DVTK_MODULE_USE_EXTERNAL_vtkzfp:BOOL=ON \
#-DVTK_MODULE_USE_EXTERNAL_vtkxdmf2:BOOL=ON \
#-DVTK_MODULE_USE_EXTERNAL_vtkxdmf3:BOOL=ON \
#-DVTK_MODULE_USE_EXTERNAL_vtkpegtl:BOOL=ON \
#-DVTK_MODULE_USE_EXTERNAL_vtkkissfft:BOOL=ON \

# compile & install!
ninja install -v

Expand Down
29 changes: 25 additions & 4 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set version = "9.0.0.rc1" %}
{% set build = 1 %}
{% set build = 2 %}

{% set minor_version = ".".join(version.split(".")[:2]) %}

Expand Down Expand Up @@ -48,7 +48,6 @@ requirements:

host:
- python
# VTK Third Party dependencies
- zlib
- freetype
- hdf5
Expand All @@ -67,11 +66,21 @@ requirements:
- boost-cpp
- tk # [not win and not VTK_WITH_OSMESA]
- ffmpeg
- utfcpp
- eigen
- double-conversion
- pugixml
- glew
- libogg
- libtheora
- proj
- loguru
- sqlite
- gl2ps
- pugixml

run:
- python
- future # used in the generated python wrappers
# VTK Third Party dependencies
- zlib
- freetype
- hdf5
Expand All @@ -88,6 +97,18 @@ requirements:
- xorg-libxt # [linux]
- tk # [not win and not VTK_WITH_OSMESA]
- ffmpeg
- utfcpp
- eigen
- double-conversion
- pugixml
- glew
- libogg
- libtheora
- proj
- loguru
- sqlite
- gl2ps
- pugixml

run_constrained:
# Paraview bundles its own VTK that has conflicting Python vtkmodules
Expand Down

0 comments on commit f71bfed

Please sign in to comment.