[vtkusers] VTK 7.1.1 iOS build

Brooksby, Glen W (GE Global Research, US) brooksby at ge.com
Tue May 23 15:38:35 EDT 2017


I'm attempting to build VTK (v7.1.1) for iOS and I've run into problems.  In looking at the top level CMakeLists.txt file I see a stanza that says:

option(VTK_IOS_BUILD "Build vtk.framework for iOS" OFF)
if (VTK_IOS_BUILD)
  include(vtkiOS)
  return()
endif()

The only instructions I see for building VTK for iOS are here<https://blog.kitware.com/building-vtk-for-mobile-architectures/>. These instructions say to set VTK_IOS_BUILD=ON and a few other variables.
However, if VTK_IOS_BUILD=ON, the stanza above causes CMake to "return", or quit processing the top-level CMakeLists.txt file.  Yet further down in the same CMakeLists.txt file I see:

if (ANDROID OR APPLE_IOS) ...

and

if (APPLE_IOS)...

These two conditionals seem to be targeting iOS, but will never be reached if VTK_IOS_BUILD=ON.  I see nowhere where APPLE_IOS is set, nor instructions to set it.

For my case I changed the first stanza to:

option(VTK_IOS_BUILD "Build vtk.framework for iOS" OFF)
if (VTK_IOS_BUILD)
include(vtkiOS)
SET (APPLE_IOS 1)
  #return()
endif()

Configure, generate, and the build seems to get much further, but the build still breaks when building for the simulator (in vtkGL2PSExporter.cxx because it's not finding vtk_gl2ps.h).

A framework is produced, but it appears to be incomplete.  Specifically, vtkInteractorStyleMultiTouchCamera.h is not included, which may be caused by APPLE_IOS being set.  Because of this the iOS example GLPaint cannot be built.

Is there anyone who is having success building VTK 7.1.1 for iOS who can shed some light on this or provide more thorough instructions? Would a different version have more success?  A VTK Framework does appear to have been produced.

For reference I'm building VTK 7.1.1, using CMake version 3.8.0.  I'm building on a Macbook air running MacOS 10.12.4 (Sierra), with Xcode 8.3.1.

Thanks,

Glen Brooksby

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170523/a0289850/attachment.html>


More information about the vtkusers mailing list