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