[Insight-users] CMake with QT ui files

Lodron, Gerald Gerald.Lodron at joanneum.at
Fri Oct 9 04:47:57 EDT 2009


Hi,

I am new to qt and quite new to CMake and I try to make a cmake which generates all stuff for qt. Here is my curren CMakeList:

# This is the root FutureLab CMakeLists file.
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
IF(COMMAND CMAKE_POLICY)
  CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)

# Set files
SET(PROJECT_NAME "FutureLab")
SET(${PROJECT_NAME}_SRCS
    main.cpp
 )
SET(${PROJECT_NAME}_UIS
 FutureLabMainWindow.ui
 )

# Start Projekt
PROJECT(${PROJECT_NAME})

# Find ITK.
FIND_PACKAGE (ITK REQUIRED)
INCLUDE( ${USE_ITK_FILE} )

# Find VTK.
FIND_PACKAGE (VTK REQUIRED)
INCLUDE( ${USE_VTK_FILE} )

# Find GDCM
FIND_PACKAGE(GDCM)
INCLUDE(${GDCM_USE_FILE})

# Find Qt4
FIND_PACKAGE (Qt4 REQUIRED)
INCLUDE(${QT_USE_FILE})

# Make ui files from the designer to header files
QT4_WRAP_UI(SOURCES_UIS_H ${${PROJECT_NAME}_UIS} )
QT4_WRAP_CPP(SOURCES_MOC ${SOURCES_UIS_H})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})

# Set lib variables
SET(VTK_LIBRARIES QVTK.lib vtkWidgets.lib vtkHybrid.lib vtkRendering.lib vtkGraphics.lib vtkverdict.lib vtkImaging.lib vtkftgl.lib vtkfreetype.lib vtkIO.lib vtkFiltering.lib vtkCommon.lib vtkDICOMParser.lib vtkmetaio.lib vtksqlite.lib vtkpng.lib vtktiff.lib vtkzlib.lib vtkjpeg.lib vtkexpat.lib vtksys.lib vtkexoIIc.lib vtkNetCDF.lib)
SET(GDCM_LIBRARIES ${GDCM_LIBRARIES} vtkgdcm.lib)

# Executable
ADD_EXECUTABLE(${PROJECT_NAME} ${${PROJECT_NAME}_SRCS} ${SOURCES_UI_H} )

# Linker
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${QT_LIBRARIES} ${ITK_LIBRARIES} ${VTK_LIBRARIES} ${GDCM_LIBRARIES})


The problem is that i cannot find the Header file

#include "ui_FutureLabMainWindow.h"

Any hints?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091009/024fff68/attachment.htm>


More information about the Insight-users mailing list