[Insight-users] CMake with QT ui files
Lodron, Gerald
Gerald.Lodron at joanneum.at
Fri Oct 9 05:15:39 EDT 2009
Oh,lol
Thankx
-----Ursprüngliche Nachricht-----
Von: Markus Neuner [mailto:neuner.markus at gmx.net]
Gesendet: Freitag, 09. Oktober 2009 11:09
An: Lodron, Gerald
Cc: Insight users (insight-users at itk.org)
Betreff: Re: [Insight-users] CMake with QT ui files
Hi,
I think you have a typo.
# Executable
ADD_EXECUTABLE(${PROJECT_NAME} ${${PROJECT_NAME}_SRCS} ${SOURCES_UIS_H} )
Nothe the "S" in SOURCES_UIS_H
Greets Markus
Lodron, Gerald wrote:
> 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?
>
> ------------------------------------------------------------------------
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list