If I build ITK in the default configuration, a simple program with
CMakeLists.txt including:
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
add_executable(TestITK TestITK.cpp)
target_link_libraries(TestITK ${ITK_LIBRARIES})
it works just fine. However, if I rebuild ITK with Module_ITKVtkGlue and
then try to build the same project, I get lots of
"cannot find -lvtkXYZ" linker errors.
If I add:
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
to my project CMakeLists.txt, it works again. Does this make sense? The
source file that is getting compiled is simply:
int main(int argc, char *argv[])
{
return 0;
}
so it should not actually need to link to VTK. Shouldn't CMake be smart
enough to realize that none of the VTK libraries that ITK was built with
are needed in this project, so it should let the project build ok without
referencing VTK at all?
Thanks,
David
_______________________________________________
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