Skip to content

Instantly share code, notes, and snippets.

@hcwiley
Created November 2, 2018 17:22
Show Gist options
  • Select an option

  • Save hcwiley/fd294c292b748d257da75baac0e93795 to your computer and use it in GitHub Desktop.

Select an option

Save hcwiley/fd294c292b748d257da75baac0e93795 to your computer and use it in GitHub Desktop.
Helper shell script for configuring and building VTK for iOS
# make sure we've got a fresh directory to work in, and our install directory exists
rm -rf ./* ; mkdir install
# Change this to the path of your vtk github source
export PATH_TO_VTK_SRC=$PWD/../vtk
# How many theads do you want to occupy with building?
export NUMBER_OF_BUILD_THREADS=8
cmake \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=$PWD/install \
-DVTK_IOS_BUILD=ON \
-DIOS_EMBED_BITCODE=OFF \
-DIOS_DEVICE_ARCHITECTURES=arm64 \
-DIOS_SIMULATOR_ARCHITECTURES=OFF \
-DModule_vtkFiltersCore=ON \
-DModule_vtkIOGeometry=ON \
-DModule_vtkFiltersModeling=ON \
-DModule_vtkFiltersPoints=ON \
-DModule_vtkFiltersSources=ON \
-DModule_vtkIOLegacy=ON \
-DModule_vtkIOPLY=ON \
-DModule_vtkIOImage=ON \
-DModule_vtkIOXML=ON \
-DModule_vtkRenderingFreeType=ON\
-DBUILD_EXAMPLES=OFF \
-DBUILD_TESTING=OFF \
$PATH_TO_VTK_SRC
make --jobs=$NUMBER_OF_BUILD_THREADS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment