On Tue, Jun 26, 2012 at 10:44 AM, Xiaoxiao Liu <[email protected]>wrote:

> It's the  Module_ITKVtkGlue that depends on VTK , not your own code.
> You should be able to configure VTK_DIR when you enabled Module_ITKVtkGlue.
> (Checkout "ITK/Modules/Bridge/VtkGlue/itk-module-init.cmake" ).
>

Xiaoxiao,

Yep, that's what I thought. I did configure VTK_DIR when I
enabled Module_ITKVtkGlue - then ITK built fine. However, then in my client
program, everything works fine, as long as I find_package(VTK) like I
mentioned. What I'm trying to say is that I don't think that should be
necessary, and you seem to agree :)

I have attached the demo I'm using - would you mind trying to build this
without the find_package(VTK) in the CMakeLists.txt? I have reproduced this
on two machines.

David
cmake_minimum_required(VERSION 2.8)
PROJECT(TestITK)

FIND_PACKAGE(ITK)
INCLUDE(${USE_ITK_FILE})

# With this commented, I get the linker errors
# FIND_PACKAGE(VTK)
# INCLUDE(${USE_VTK_FILE})

ADD_EXECUTABLE(TestITK TestITK.cxx)

TARGET_LINK_LIBRARIES(TestITK ${ITK_LIBRARIES})

Attachment: TestITK.cxx
Description: Binary data

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers

Reply via email to