<div dir="ltr"><div>See the CMakeLists.txt example in Apps/Android/Kiwi/jni that I mentioned in my last email. That project does a find_package() for VES and VTK. For vtk-host, no, it isn't installed because it's not normally used, but you can run make install in the CMakeExternals/Build/vtk-host directory. But, you can just as easily use VTK directory from it's build directory. When you configure your project, just set VTK_DIR=/path/to/build/CMakeExternals/Build/vtk-host. Then use find_package(VTK) in your project's CMakeLists.txt.<br>
<br></div><div>The kiwi tests don't use ves-config.cmake because they are not meant to be built as a separate project... they are compiled as part of VES. Have you copied them elsewhere? In that case, again, see the Android/Kiwi example as a standalone project that uses VES and VTK.<br>
<br></div>Pat<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jul 6, 2013 at 7:05 AM, John Donovan <span dir="ltr"><<a href="mailto:mersey.viking@gmail.com" target="_blank">mersey.viking@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">OK, I had assumed that there would be a standard install target that<br>
could be run from the main makefile, but no matter, I've softlinked<br>
the Install directory to a convenient place. But here's another thing<br>
I'm not getting is that the CMakeLists.txt for the test don't appear<br>
to use the ves-config.cmake, so for now I've just added the paths to<br>
the CPLUS_INCLUDE_PATH env var. What's happening now is that it can't<br>
find the VTK headers - again, another assumption is that the<br>
superbuild would put the relevant files into the<br>
CMakeExternals/Install/vtk-host directory, but that's empty - is there<br>
an install step for VTK that I missed? The superbuild seems to build<br>
VTK fine and the header it can't find is in<br>
/home/pi/bin/VES/CMakeExternals/Source/vtk/Common/Core/vtkSmartPointer.h<br>
<span class="HOEnZb"><font color="#888888"><br>
-JD<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On 5 July 2013 17:19, Pat Marion <<a href="mailto:pat.marion@kitware.com">pat.marion@kitware.com</a>> wrote:<br>
> There is an install target. The superbuild installs VES locally in<br>
> CMakeExternals/Install/ves-host. Only headers and libs are installed, not<br>
> the test programs. The install tree is relocatable, you can copy the<br>
> directories to someplace else. Also a ves-config.cmake file is installed so<br>
> that you can find and use VES using cmake from an external project. For an<br>
> example, see the CMakeLists.txt in Apps/Android/Kiwi/jni<br>
><br>
> Pat<br>
><br>
><br>
><br>
> On Fri, Jul 5, 2013 at 12:14 PM, John Donovan <<a href="mailto:mersey.viking@gmail.com">mersey.viking@gmail.com</a>><br>
> wrote:<br>
>><br>
>> OK, that makes sense. Yes, I've made sure VES_USE_DESKTOP_GL was set<br>
>> to OFF but I found BUILD_TESTING was set to ON in one macro. I had<br>
>> assumed that the no desktop/build test combo build non-GLUT tests,<br>
>> which was where my confusion lay, so I changed the macro and I've just<br>
>> built the libraries successfully - it looks like there is no "install"<br>
>> target though, so presumably I'll have to set up paths manually. I'll<br>
>> have a go at the TestKiwiViewer in a while.<br>
>><br>
>> Thanks for the hand-holding!<br>
>><br>
>> -JD<br>
>><br>
>> On 5 July 2013 14:52, Aashish Chaudhary <<a href="mailto:aashish.chaudhary@kitware.com">aashish.chaudhary@kitware.com</a>><br>
>> wrote:<br>
>> > On Fri, Jul 5, 2013 at 6:33 AM, John Donovan <<a href="mailto:mersey.viking@gmail.com">mersey.viking@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> OK, the issue I seem to be getting is a conflict between the function<br>
>> >> declarations in gl.h and those in GLES/gl2.h while compiling<br>
>> >> TestDrawPlane.cpp because (free)GLUT is including the standard OpenGL<br>
>> >> headers. I'm surprised GLUT is needed at all on mobile platforms, but<br>
>> >> vesTestHelper.h uses it.<br>
>> ><br>
>> ><br>
>> > No GLUT is not required on mobile platforms. We use it on desktop for<br>
>> > testing. Did you set VES_USE_DESKTOP_GL to OFF? Another thing to try<br>
>> > is<br>
>> > set BUILD_TESTING to OFF (just to make sure you can compile core<br>
>> > libraries<br>
>> > on the system).<br>
>> >><br>
>> >><br>
>> >> As GLUT includes GL/gl.h, I can't even put the GLES include<br>
>> >> directories first, and surely I don't have to overwrite GL/gl.h with<br>
>> >> the GLES version. Maybe my configuration is messed up, I'll carry on<br>
>> >> poking around.<br>
>> >><br>
>> >> -John<br>
>> >><br>
>> >> On 5 July 2013 01:04, Aashish Chaudhary <<a href="mailto:aashish.chaudhary@kitware.com">aashish.chaudhary@kitware.com</a>><br>
>> >> wrote:<br>
>> >> > +1 It would be awesome to completely support Raspberry Pi<br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> > On Thu, Jul 4, 2013 at 4:43 PM, John Donovan<br>
>> >> > <<a href="mailto:mersey.viking@gmail.com">mersey.viking@gmail.com</a>><br>
>> >> > wrote:<br>
>> >> >><br>
>> >> >> Hi Pat,<br>
>> >> >> Thanks for the quick reply. I'll get those files in and compiling<br>
>> >> >> later. The project I am involved in is in its early stages, but I am<br>
>> >> >> happy to hack on the VES source code to improve support for the Pi<br>
>> >> >> and<br>
>> >> >> submit pull requests or patches if that would be of help.<br>
>> >> >><br>
>> >> >> Regards,<br>
>> >> >> John<br>
>> >> >><br>
>> >> >> On 4 July 2013 21:33, Pat Marion <<a href="mailto:pat.marion@kitware.com">pat.marion@kitware.com</a>> wrote:<br>
>> >> >> > Hi John,<br>
>> >> >> ><br>
>> >> >> > Luis and I got VES to run on raspberry pi without X11, but the<br>
>> >> >> > work<br>
>> >> >> > didn't<br>
>> >> >> > get far enough to get full support added to the VES repository.<br>
>> >> >> > Attached<br>
>> >> >> > are two files that are work in progress, this is as far as I got.<br>
>> >> >> > It<br>
>> >> >> > works<br>
>> >> >> > with basic mouse input, but it doesn't support keyboard input. My<br>
>> >> >> > next<br>
>> >> >> > plan<br>
>> >> >> > was going to look at SDL to see if I could get key and mouse<br>
>> >> >> > events<br>
>> >> >> > that<br>
>> >> >> > way.<br>
>> >> >> ><br>
>> >> >> > To use the attached files, replace src/kiwi/vesKiwiTestHelper.h<br>
>> >> >> > with<br>
>> >> >> > the<br>
>> >> >> > attached file. Copy vesTestHelperRaspi.h into src/kiwi. Compile,<br>
>> >> >> > and<br>
>> >> >> > hopefully if there are compile issues it's easy to fix. Then<br>
>> >> >> > launch<br>
>> >> >> > TestKiwiViewer from the terminal before starting the graphical<br>
>> >> >> > desktop<br>
>> >> >> > environment with X11. You should get a fullscreen render window<br>
>> >> >> > that<br>
>> >> >> > shows<br>
>> >> >> > the spaceship dataset. Clicking the mouse should exit. I think<br>
>> >> >> > everything<br>
>> >> >> > should work once the keyboard/mouse input is implemented.<br>
>> >> >> ><br>
>> >> >> > Luis and I also ran VES using X11, but I don't remember if that<br>
>> >> >> > was<br>
>> >> >> > using<br>
>> >> >> > GLUT or if it used the old VES tests that used only EGL and ES 2.0<br>
>> >> >> > and<br>
>> >> >> > got<br>
>> >> >> > keyboard/mouse events directly from X11 apis instead of using<br>
>> >> >> > GLUT.<br>
>> >> >> > If<br>
>> >> >> > you<br>
>> >> >> > look at the git history of TestKiwiViewer.cpp, you'll find an<br>
>> >> >> > older<br>
>> >> >> > version<br>
>> >> >> > before GLUT was used.<br>
>> >> >> ><br>
>> >> >> > Pat<br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >> > On Thu, Jul 4, 2013 at 4:09 PM, John Donovan<br>
>> >> >> > <<a href="mailto:mersey.viking@gmail.com">mersey.viking@gmail.com</a>><br>
>> >> >> > wrote:<br>
>> >> >> >><br>
>> >> >> >> Having just watched the webinar on ITK and VTK on the Pi, I<br>
>> >> >> >> thought<br>
>> >> >> >> I<br>
>> >> >> >> would have a go at compiling VES on my Pi under the latest<br>
>> >> >> >> Raspbian<br>
>> >> >> >> using the Superbuild. It compiled fine, but I'm having problems<br>
>> >> >> >> running the examples.<br>
>> >> >> >><br>
>> >> >> >> the video says that VES bypasses X completely which is great, but<br>
>> >> >> >> if<br>
>> >> >> >> I<br>
>> >> >> >> run TestKiwiViewer from the terminal (directly from the Pi, not<br>
>> >> >> >> via<br>
>> >> >> >> SSH), I get:<br>
>> >> >> >> freeglut (./TestKiwiViewer): failed to open display ''<br>
>> >> >> >><br>
>> >> >> >> Running from within X gives me:<br>
>> >> >> >> freeglut (./TestKiwiViewer): OpenGL GLX extension not supported<br>
>> >> >> >> by<br>
>> >> >> >> display<br>
>> >> >> >> ':0'<br>
>> >> >> >><br>
>> >> >> >> When I was compiling VES it couldn't find GLUT, so I<br>
>> >> >> >> apt-installed<br>
>> >> >> >> freeglut3-dev, which I presume is the right dependency. Also I'm<br>
>> >> >> >> using<br>
>> >> >> >> the version of cmake from the repo - 2.8.9 rather than the very<br>
>> >> >> >> latest<br>
>> >> >> >> one as suggested in the ITK on the Raspberry Pi video.<br>
>> >> >> >><br>
>> >> >> >> Is there a step I have missed?<br>
>> >> >> >><br>
>> >> >> >> Regards,<br>
>> >> >> >> John<br>
>> >> >> >><br>
>> >> >> >> --<br>
>> >> >> >> One of the advantages of being disorderly is that one is<br>
>> >> >> >> constantly<br>
>> >> >> >> making exciting discoveries. - AA Milne<br>
>> >> >> >> _______________________________________________<br>
>> >> >> >> Ves mailing list<br>
>> >> >> >> <a href="mailto:Ves@public.kitware.com">Ves@public.kitware.com</a><br>
>> >> >> >> <a href="http://public.kitware.com/cgi-bin/mailman/listinfo/ves" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/ves</a><br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >><br>
>> >> >><br>
>> >> >><br>
>> >> >> --<br>
>> >> >> One of the advantages of being disorderly is that one is constantly<br>
>> >> >> making exciting discoveries. - AA Milne<br>
>> >> >> _______________________________________________<br>
>> >> >> Ves mailing list<br>
>> >> >> <a href="mailto:Ves@public.kitware.com">Ves@public.kitware.com</a><br>
>> >> >> <a href="http://public.kitware.com/cgi-bin/mailman/listinfo/ves" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/ves</a><br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> > --<br>
>> >> > | Aashish Chaudhary<br>
>> >> > | R&D Engineer<br>
>> >> > | Kitware Inc.<br>
>> >> > | <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> >><br>
>> >><br>
>> >><br>
>> >> --<br>
>> >> One of the advantages of being disorderly is that one is constantly<br>
>> >> making exciting discoveries. - AA Milne<br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > | Aashish Chaudhary<br>
>> > | R&D Engineer<br>
>> > | Kitware Inc.<br>
>> > | <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>><br>
>><br>
>><br>
>> --<br>
>> One of the advantages of being disorderly is that one is constantly<br>
>> making exciting discoveries. - AA Milne<br>
><br>
><br>
<br>
<br>
<br>
--<br>
One of the advantages of being disorderly is that one is constantly<br>
making exciting discoveries. - AA Milne<br>
</div></div></blockquote></div><br></div>