[Insight-users] ITK, VTK and QT

Luis Ibanez luis.ibanez at kitware.com
Sun Dec 11 07:57:35 EST 2005


Hi DiLLa,

Please find below a CMakeLists.txt file for combining

                  ITK + VTK + QT


   Regards,


      Luis


====================

# This project is designed to be built outside the Insight source tree.
PROJECT(colony)

# Find ITK.
SET(QT_MOC_EXECUTABLE ${ITK_QT_MOC_EXECUTABLE})


FIND_PACKAGE(ITK)
IF(ITK_FOUND)
   INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
   MESSAGE(FATAL_ERROR
           "Cannot build without ITK.  Please set ITK_DIR.")
ENDIF(ITK_FOUND)

INCLUDE(${CMAKE_ROOT}/Modules/FindQt.cmake)

INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR}
${QT_INCLUDE_PATH}
)

SET (DisplayUtilHeaders
   displayutil.h
)

SET (ImageViewerHeaders
   imageviewer.h
)

SET (SelectDialogHeaders
   selectDialog.h
)

#QT_WRAP_UI(displayutil imageviewer selectDialog)
QT_WRAP_CPP(displayutil MOCDisplay ${DisplayUtilHeaders} )
QT_WRAP_CPP(imageviewer MOCViewer ${ImageViewerHeaders} )
QT_WRAP_CPP(selectDialog MOCDialog ${SelectDialogHeaders} )

ADD_EXECUTABLE(colony colony.cpp curveutil.cpp displayutil.cpp 
evolve.cpp imageutil.cpp imageviewer.cpp kernelutil.cpp selectDialog.h 
main.cpp ${MOCDisplay} ${MOCViewer} ${MOCDialog})

LINK_DIRECTORIES(/opt/icc/lib-linux/)
TARGET_LINK_LIBRARIES(colony  ITKCommon ITKIO ${QT_LIBRARIES} 
/opt/icc/lib-linux/libicc.a tiff)


========================================================




------------------------
DiLLa HaNdiNi wrote:
> Hi Luis,
>  
> Yeah, I was trying to use CMake to configure my project, yet I have no 
> idea on how to combine the 3 together (ITK, VTK, and QT) when I already 
> have codes for QT and ITK-VTK separately; then I chose to use manual way.
> I mean, I don't know how to configure a project not from scratch using 
> CMake.
> Anybody can give me enlightment on this ?
> And could provide me the template for the CMakelists file for the 
> integration ?
>  
> Thank you for bearing with me about this topic.
>  
> Regards,
> Dilla.
>  
> On 12/10/05, *Luis Ibanez* <luis.ibanez at kitware.com 
> <mailto:luis.ibanez at kitware.com>> wrote:
> 
> 
>     Hi DiLLa,
> 
>     You *should use CMake* for configuring your project.
> 
> 
>     That will save you *a lot of time and frustration*.
> 
> 
>     CMake was designed for solving the exact problems
>     that you are facing.
> 
> 
>     If you were using CMake, by now you will be doing
>     image processing and being productive, instead of
>     wasting your valuable time playing around with the
>     little options of Visual Studio.
> 
> 
>     All your efforts in manually setting up your project
>     will go to the trash as soon as you need to move your
>     project to another computer.
> 
> 
> 
>        Regards,
> 
> 
> 
>           Luis
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list