Hi, The the recent release of ITK may changes VTK_LIBRARIES, when I build ITK with VTK, i.e. set on Module_ITKVtkGlue or Module_WikiExamples. Please see the attached toy example, and check if the issue can be reproduced on your side. Thanks. I am using ITK 4.7.1, VTK 6.1.0, cmake 2.8.12.2. If I build ITK with VTK, VTK_LIBRARIES will be changed to VTK_LIBRARIES=vtkCommonCore;vtksys , even if I find ITK first before I find VTK. If I build ITK without VTK, everything is fine. A workaround is to find VTK first, then copy VTK_LIBRARIES to a variable, then find ITK and copy VTK_LIBRARIES back.
best, Jian Cheng
project( itkEigenSolverTraits ) cmake_minimum_required( VERSION 2.8 ) find_package( VTK REQUIRED ) include( ${VTK_USE_FILE} ) set(VTK_LIBRARIES_back ${VTK_LIBRARIES}) message("VTK_LIBRARIES=${VTK_LIBRARIES}") find_package( ITK REQUIRED ) include( ${ITK_USE_FILE} ) # set(VTK_LIBRARIES ${VTK_LIBRARIES_back}) message("VTK_LIBRARIES=${VTK_LIBRARIES}") message("ITK_LIBRARIES=${ITK_LIBRARIES}") add_executable(main main.cxx) target_link_libraries(main ${ITK_LIBRARIES} ${VTK_LIBRARIES})
#include "itkImage.h" int main (int argc, char const* argv[]) { typedef itk::Image<double,3> ImageType; ImageType::Pointer image = ImageType::New(); return 0; }
_______________________________________________ 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://public.kitware.com/mailman/listinfo/insight-developers