[vtk-developers] FindPackage not working in new module system

Ben Boeckel ben.boeckel at kitware.com
Wed Jan 9 15:06:40 EST 2019


On Wed, Jan 09, 2019 at 11:44:01 -0800, Bill Lorensen wrote:
> TYhis cmake file:
> cmake_minimum_required(VERSION 2.8)
> 
> PROJECT(ReadOBJ)
> 
> find_package(VTK REQUIRED)
> include(${VTK_USE_FILE})
> 
> add_executable(ReadOBJ MACOSX_BUNDLE ReadOBJ.cxx )
> 
> target_link_libraries(ReadOBJ ${VTK_LIBRARIES})
> 
> I specify the VTK_DIR to point at a new module VTK build. I'm using
> cmake version 3.10.3

The vtk-config.cmake file is in the `lib/cmake/vtk-*` directory of the
build tree, not the top-level. This mirrors the install tree and also
keeps the code between the two very similar (instead of having to differ
on relative paths to other generated CMake files).

--Ben


More information about the vtk-developers mailing list