[Insight-users] ITK, CMake and Qt4

Luis Ibanez luis.ibanez at kitware.com
Tue Jul 17 11:47:28 EDT 2007


Hi Zein,


Please find attached an example CMakeLists.txt file
for an application that combines ITK, Qt4 and it is
configured with CMake 2.4.6.


   Regards


      Luis


------------------
Zein Salah wrote:
> 
> Dear all,
> 
> Did anybody manage to build application with ITK and Qt4 (using the 
> Qt-Designer) using CMake 2.4.6 under Windows ?
> I would appreciate a sample working CMakeList file.
> 
> Much thanks,
> Zein
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
-------------- next part --------------

PROJECT(MyApplicationQtDialog)

CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6)

FIND_PACKAGE(Qt4 REQUIRED) 


INCLUDE(${QT_USE_FILE})


INCLUDE_DIRECTORIES(
  ${QT_INCLUDE_DIR}
  ${MyApplicationQtDialog_SOURCE_DIR}
  ${MyApplicationQtDialog_BINARY_DIR}
  )


SET(MyApplicationQtDialog_SRCS
  MyApplicationMain.cpp
  MyApplicationGUI.cpp
  itkEventToQtSignalTranslator.cxx
  )

QT4_AUTOMOC(${MyApplicationQtDialog_SRCS})


QT4_WRAP_UI(MyApplicationQtDialog_UIS_H
  MyApplicationGUI.ui
)

ADD_EXECUTABLE(MyApplicationQtDialog WIN32
  ${MyApplicationQtDialog_SRCS}
  ${MyApplicationQtDialog_UIS_H}
  )

TARGET_LINK_LIBRARIES(MyApplicationQtDialog
  ITKStatistics 
  ITKIO 
  ITKCommon 
  vtkImaging
  vtkIO
  ${QT_LIBRARIES}
  )



More information about the Insight-users mailing list