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

Aron Helser aron.helser at kitware.com
Thu Jan 10 12:18:37 EST 2019


With a very similar cmake file, I'm seeing the error:

CMake Error at CMakeLists.txt:6 (include):
include called with wrong number of arguments. include() only takes one
file.


I pointed VTK_Dir at ".....vtk/build/lib/cmake/vtk-8.90" , like you
suggested. My VTK build does have OpenVR enabled, on windows, so I have to
set OpenVR_INCLUDE_DIR and OpenVR_LIBRARY.


If I change to:


include("${VTK_USE_FILE}")


It warns that no file was provided, then during compile it can't find VTK
headers.


The find_package(VTK REQUIRED) is going wrong?'


What am I doing wrong?

Thanks,

Aron

On Wed, Jan 9, 2019 at 3:06 PM Ben Boeckel via vtk-developers <
vtk-developers at vtk.org> wrote:

> 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
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> https://vtk.org/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtk-developers/attachments/20190110/e082f196/attachment.html>


More information about the vtk-developers mailing list