[vtkusers] Class-libraries mapping
Sensei
senseiwa at gmail.com
Fri Jul 1 04:43:17 EDT 2011
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
More information about the vtkusers
mailing list