[vtkusers] VTK 7.1.1 iOS build

Brooksby, Glen W (GE Global Research, US) brooksby at ge.com
Tue May 23 17:03:34 EDT 2017


Thanks for the prompt reply Ken.  I’ll give it another go.  The only difference I see between your build and mine is OPENGL_ES_VERSION=3.0, and BUILD_EXAMPLES=ON, whereas I had ES=2.0 and examples off. I’ll make the change and see what happens.

Glen

From: Ken Martin [mailto:ken.martin at kitware.com]
Sent: Tuesday, May 23, 2017 3:58 PM
To: Brooksby, Glen W (GE Global Research, US) <brooksby at ge.com>
Cc: vtkusers at vtk.org
Subject: EXT: Re: [vtkusers] VTK 7.1.1 iOS build

The ios build of VTK starts at the top where it sets up subdirectories and then recursively calls cmake on VTK for those subdirectories with specific options. So the return at the top is correct. When the build process is building the subdirectories it will process that same file with different settings where it will get to those later if statements.

Also you can look at

https://open.cdash.org/viewNotes.php?buildid=4909344

which shows how the nightly dashboard is setup for iOS.


Hope that helps!
Ken

On Tue, May 23, 2017 at 3:38 PM, Brooksby, Glen W (GE Global Research, US) <brooksby at ge.com<mailto:brooksby at ge.com>> wrote:
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


_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170523/4b9fe3b4/attachment.html>


More information about the vtkusers mailing list