[Insight-users] Including Qt lib in VSNET project with cmake

Luis Ibanez luis.ibanez at kitware.com
Mon Apr 3 12:36:45 EDT 2006


Hi Matt,


For guidance on how to setup a CMakeLists.txt file for
using ITK along with Qt, Please refer to the directories:


           InsightApplications/QtITK

and

           InsightApplications/Auxiliary/QtImageViewer




   Regards,


      Luis


============================
Matt Kelsey wrote:
> Hello,
> I have a pretty simple project going using several itk types and
> functions.  I use cmake to put together a VS .net (2003) solution. 
> I'd like to use a couple of the data types and function available in
> Qt4.  If I add the include directories and libraries manually with
> Visual Studio, the project reloads on a build and removes the added
> libs and include dirs.  This is annoying, as is adding them in with
> VS's interface.  I'd like to specify in the CMakeLists.txt file which
> other libraries and directories to to include.  My current file is
> just one from the examples with my modifications (see below).  If
> anyone could point me in the right direction I would appriciate it.
> 
> Thanks,
> Matt
> 
> 
> CMakeLists.txt
> 
> 
> PROJECT(AutoSegment)
> FIND_PACKAGE(ITK)
> IF(ITK_FOUND)
>     INCLUDE(${ITK_USE_FILE})
> ELSE(ITK_FOUND)
>     MESSAGE(FATAL_ERROR
>         "ITK not found. Please set ITK_DIR.")
> ENDIF(ITK_FOUND)
> ADD_EXECUTABLE(AutoSegment autoSegment.cxx autoSegment.h
> regionLabels.cxx regionLabels.h segmentationRoutines.cxx
> segmentationRoutines.h RegionInfoClass.cxx RegionInfoClass.h
> ImageROIClass.cxx ImageROIClass.h common.cxx common.h)
> TARGET_LINK_LIBRARIES(AutoSegment ITKCommon ITKIO ITKStatistics ITKNumerics)
> _______________________________________________
> 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