[vtkusers] Class-libraries mapping

Shashwath T.R. trshash at gmail.com
Sun Jul 3 10:11:14 EDT 2011


You've got to do an

INCLUDE(${VTK_USE_FILE})

before VTK_LIBRARIES gets defined.

Shash

On Fri, Jul 1, 2011 at 2:13 PM, Sensei <senseiwa at gmail.com> wrote:

>
> On Jun 29, 2011, at 6:26pm, David Doria wrote:
>
> > With recent versions of VTK, the preferred method is to link to
> ${VTK_LIBRARIES}
>
>
> David, something is wrong with this on my system (OSX 10.6 with gcc, cmake
> 2.8.1, vtk 5.6). I am compiling a simple example from the wiki (*), however,
> it seems that the variable ${VTK_LIBRARIES} is empty (kits, however, are
> ok). This is my configuration:
>
> CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
>
> PROJECT(PP)
>
> FIND_PACKAGE(VTK REQUIRED)
> INCLUDE(${VTK_USE_FILE})
>
> MESSAGE("VTK:              ${VTK_FOUND}")
> MESSAGE("VTK_INCLUDE_DIRS: ${VTK_INCLUDE_DIRS}")
> MESSAGE("VTK_LIBRARY_DIRS: ${VTK_LIBRARY_DIRS}")
> MESSAGE("VTK_KITS:         ${VTK_KITS}")
> MESSAGE("VTK_DIR:          ${VTK_DIR}")
> MESSAGE("VTK_LIBRARIES:    ${VTK_LIBRARIES}")
>
> ADD_EXECUTABLE(PP a.cpp)
>
> IF(VTK_FOUND)
>  TARGET_LINK_LIBRARIES(PP ${VTK_LIBRARIES})
>  MESSAGE("==> WITH LIBS")
> ELSE()
>  TARGET_LINK_LIBRARIES(PP vtkHybrid)
>  MESSAGE("==> *NO* LIBS")
> ENDIF()
>
>
> As you can see, the variable isn't filled with any item:
>
>
> % cmake ..
> -- The C compiler identification is GNU
> -- The CXX compiler identification is GNU
> -- Checking whether C compiler has -isysroot
> -- Checking whether C compiler has -isysroot - yes
> -- Checking whether C compiler supports OSX deployment target flag
> -- Checking whether C compiler supports OSX deployment target flag - yes
> -- Check for working C compiler: /usr/bin/gcc
> -- Check for working C compiler: /usr/bin/gcc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Checking whether CXX compiler has -isysroot
> -- Checking whether CXX compiler has -isysroot - yes
> -- Checking whether CXX compiler supports OSX deployment target flag
> -- Checking whether CXX compiler supports OSX deployment target flag - yes
> -- Check for working CXX compiler: /usr/bin/c++
> -- Check for working CXX compiler: /usr/bin/c++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> VTK:              1
> VTK_INCLUDE_DIRS: /Users/sensei/Applications/vtk/include/vtk-5.6
> VTK_LIBRARY_DIRS: /Users/sensei/Applications/vtk/lib/vtk-5.6
> VTK_KITS:
> COMMON;FILTERING;IO;GRAPHICS;GENERIC_FILTERING;IMAGING;RENDERING;VOLUMERENDERING;HYBRID;WIDGETS;INFOVIS;GEOVIS;VIEWS;QVTK;CHARTS
> VTK_DIR:          /Users/sensei/Applications/vtk/lib/vtk-5.6
> VTK_LIBRARIES:
> ==> WITH LIBS
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /Users/sensei/Public/x
>
>
>
> Am I missing something?
>
> By the way, why isn't cmake warning about checking for vtk? It finds it,
> but no output like "Check for working VTK" is flushed to the console.
>
> Thanks!
>
>
> (*)
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/SimpleOperations/DistancePointToLine
> _______________________________________________
> Powered by 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110703/a1abb936/attachment.htm>


More information about the vtkusers mailing list