[vtkusers] find_package( ITK ) overrides ${VTK_LIBRARIES} from find_package( VTK )
Pablo Hernández
pablo.hernandez.cerdan at outlook.com
Tue Dec 2 00:26:28 EST 2014
I have a running/compiling CMakeLists.txt when using VTK only, this is the related VTK part:
find_package(VTK 6.2 REQUIRED)
message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}")
message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}")
include(${VTK_USE_FILE})
include_directories( ${VTK_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_executable(VTKNodesEdgesEXE main.cpp ${source_files} ${QT_UI_HEADERS} ${QT_RESOURCES})
target_link_libraries(VTKNodesEdgesEXE ${VTK_LIBRARIES})
target_link_libraries(VTKNodesEdgesEXE Qt5::Widgets Qt5::PrintSupport)
The problem is that if I add find_package(ITK) anywhere, ${VTK_LIBRARIES} gets overrides by a tiny list selected by ITK.
> Date: Tue, 2 Dec 2014 00:12:56 -0500
> Subject: Re: [vtkusers] find_package( ITK ) overrides ${VTK_LIBRARIES} from find_package( VTK )
> From: bill.lorensen at gmail.com
> To: pablo.hernandez.cerdan at outlook.com
> CC: vtkusers at vtk.org
>
> This is normal usage:
>
> find_package(ITK REQUIRED)
> include(${ITK_USE_FILE})
>
> find_package(VTK REQUIRED)
> include(${VTK_USE_FILE})
>
> I do not see the include's in your example. Please show the entire
> CMakeList.txt file
>
>
> On Mon, Dec 1, 2014 at 11:50 PM, Pablo Hernández
> <pablo.hernandez.cerdan at outlook.com> wrote:
> > I have compiled ITK with the use_vtk option. And now ITK overrides the
> > VTK_LIBRARIES, with a really small list of libraries.
> >
> > find_package(ITK 4.5 REQUIRED)
> > message (status "** ITK FOUND: USE_FILES ${ITK_USE_FILE}")
> > message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}")
> > message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}")
> >
> > find_package(VTK 6.2 REQUIRED)
> > message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}")
> > message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}")
> >
> > Output:
> > status** ITK FOUND: USE_FILES
> > /home/phc/Software/ITK/install-debug-nocuda-v461/lib/cmake/ITK-4.7/UseITK.cmake
> > status** VTK FOUND: USE_FILES
> > /home/phc/Software/VTK/installation/qt5-git/lib/cmake/vtk-6.2/UseVTK.cmake
> > status** VTK FOUND: VTK_LIBRARIES
> > vtkCommonCore;vtksys;vtkRenderingCore;vtkCommonExecutionModel;
> > vtkCommonDataModel;vtkCommonMath;vtkCommonMisc;vtkCommonSystem;
> > vtkCommonTransforms;vtkFiltersExtraction;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry;
> > vtkFiltersStatistics;vtkImagingFourier;vtkImagingCore;vtkalglib;vtkFiltersGeometry;vtkFiltersSources;vtkRenderingOpenGL;
> > vtkImagingHybrid;vtkIOImage;vtkDICOMParser;vtkIOCore;vtkzlib;vtkmetaio;vtkjpeg;vtkpng;vtktiff;vtkRenderingFreeType;
> > vtkfreetype;vtkftgl;vtkInteractionStyle;vtkImagingSources
> >
> > status** VTK FOUND: USE_FILES
> > /home/phc/Software/VTK/installation/qt5-git/lib/cmake/vtk-6.2/UseVTK.cmake
> > status** VTK FOUND: VTK_LIBRARIES
> > vtkCommonCore;vtksys;vtkRenderingCore;vtkCommonExecutionModel;
> > vtkCommonDataModel;vtkCommonMath;vtkCommonMisc;vtkCommonSystem;
> > vtkCommonTransforms;vtkFiltersExtraction;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry;
> > vtkFiltersStatistics;vtkImagingFourier;vtkImagingCore;vtkalglib;vtkFiltersGeometry;vtkFiltersSources;vtkRenderingOpenGL;
> > vtkImagingHybrid;vtkIOImage;vtkDICOMParser;vtkIOCore;vtkzlib;vtkmetaio;vtkjpeg;vtkpng;vtktiff;vtkRenderingFreeType;
> > vtkfreetype;vtkftgl;vtkInteractionStyle;vtkImagingSources
> >
> >
> > --Same output TWICE ...--
> >
> > If I find VTK first and then ITK I got the same results.
> >
> > But if I don't find ITK, ie. with VTK alone I get the triple amount of
> > libraries, and I need those libraries to compile my code.
> > Is this a bug in ITK (or cmake, or VTK) or am I doing something wrong in my
> > CMakeLists.txt?
> >
> > find_package(VTK 6.2 REQUIRED)
> > message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}")
> > message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}")
> >
> > Output:
> > status** VTK FOUND: USE_FILES
> > /home/phc/Software/VTK/installation/qt5-git/lib/cmake/vtk-6.2/UseVTK.cmake
> > status** VTK FOUND: VTK_LIBRARIES
> > vtkIOMPIImage;vtkIOImage;vtkCommonDataModel;
> > vtkCommonMath;vtkCommonCore;vtksys;vtkCommonMisc;vtkCommonSystem;
> > vtkCommonTransforms;vtkCommonExecutionModel;vtkDICOMParser;vtkIOCore;vtkzlib;vtkmetaio;vtkjpeg;
> > vtkpng;vtktiff;vtkParallelMPI;vtkParallelCore;vtkIOLegacy;vtkfreetype;vtkIOVideo;vtkImagingColor;vtkImagingCore;
> > vtkRenderingLIC;vtkIOXML;vtkIOGeometry;vtkjsoncpp;vtkIOXMLParser;vtkexpat;vtkImagingSources;vtkRenderingOpenGL;
> > vtkImagingHybrid;vtkRenderingCore;vtkFiltersExtraction;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry;
> > vtkFiltersStatistics;vtkImagingFourier;vtkalglib;vtkFiltersGeometry;vtkFiltersSources;vtkInteractionStyle;vtkRenderingQt;
> > vtkFiltersTexture;vtkGUISupportQt;vtkRenderingLabel;vtkRenderingFreeType;vtkftgl;vtkRenderingContext2D;vtkViewsQt;
> > vtkViewsInfovis;vtkChartsCore;vtkCommonColor;vtkInfovisCore;vtkFiltersImaging;vtkImagingGeneral;vtkFiltersModeling;
> > vtkInfovisLayout;vtkViewsCore;vtkInteractionWidgets;vtkFiltersHybrid;vtkRenderingAnnotation;vtkRenderingVolume;vtkDomainsChemistry;
> > vtkIOParallel;vtkFiltersParallel;vtkIONetCDF;vtkNetCDF;vtkNetCDF_cxx;vtkhdf5_hl;vtkhdf5;vtkexoIIc;vtklibxml2;vtkRenderingFreeTypeOpenGL;
> > vtkTestingRendering;vtkFiltersProgrammable;vtkRenderingGL2PS;vtkRenderingContextOpenGL;vtkgl2ps;vtkFiltersHyperTree;vtkIOMPIParallel;
> > vtkIOMovie;vtkIOExodus;vtkTestingIOSQL;vtkIOSQL;vtksqlite;vtkFiltersSelection;vtkFiltersVerdict;verdict;vtkIOMINC;vtkImagingStencil;vtkInteractionImage;
> > vtkIOLSDyna;vtkRenderingLOD;vtkFiltersParallelImaging;vtkIOPLY;vtkViewsGeovis;vtkGeovisCore;vtkproj4;vtkRenderingImage;vtkIOInfovis;vtkIOEnSight;
> > vtkRenderingVolumeOpenGL;vtkImagingStatistics;vtkFiltersFlowPaths;vtkIOParallelNetCDF;vtkIOAMR;vtkFiltersAMR;vtkViewsContext2D;
> > vtkFiltersParallelGeometry;vtkIOParallelXML;vtkIOExport;vtkGUISupportQtSQL;vtkInfovisBoostGraphAlgorithms;vtkFiltersParallelMPI;
> > vtkGUISupportQtWebkit;vtkGUISupportQtOpenGL;vtkFiltersSMP;vtkImagingMorphological;vtkIOImport;vtkTestingGenericBridge;
> > vtkImagingMath;vtkFiltersGeneric;vtkRenderingVolumeAMR
> >
> >
> >
> >
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the VTK FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/vtkusers
> >
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141202/d3d37e17/attachment.html>
More information about the vtkusers
mailing list