[Cmake] Re: cmake and moc files

imho imho at skynet.be
Sun Mar 2 12:56:53 EST 2003


Hi,
thanks for the file, but now I have this strange error :
 

CMake Error: can not find file
 /home/imho/NewProject4/affichage16coupes.h;affichage1coupe.h;affichage1vue3D.h
 ;affichage4coupes.h;affichage4vues.h;affichageVTK.h;affichageVTK3D.h;creationV
 TK3D.h;readerVTK.h;traitementITK.h;vtkITKUtility.h;vtkInteractorStyleCustom.h;
 vtkInteractorStyleDraw.h;vtkQGLImageMapper.h;vtkQGLImageWindow.h;vtkQGLLight.c
 xx;vtkQGLLight.h;vtkQGLPtrToQT.h;vtkQGLPtrToVTK.h;vtkQGLRenderWindow.h;vtkQGLT
 exture.h;vtkQtObjectFactory.h;vtkQtOpenGLPolyDataMapper.h;moc_NewProject_MOC_S
 RCS.cxx

all these files are in the same directory as the cmakelists 
( /home/imho/NewProject4/ here)
What should I change?

Thanks


>
> -------- Original Message --------
> Subject: Re: cmake and moc files
> Date: Fri, 28 Feb 2003 08:54:22 -0500 (EST)
> From: Brad King <brad.king at kitware.com>
> To: imho <imho at skynet.be>
>
>> I've tried what you said but I still have problems (linking errors). I
>> join the cmakelists file. Maybe I do wrong with the moc files. I've
>> putted in NewProject_MOC_SRCS all the files who the moc generated file
>> was not null.
>
>
> The multiple definition errors seem to indicate that the same files are
> being wrapped twice.  This may be because you have the .cpp files listed
> with the headers.  Try the attached file.  If it doesn't work, replace 
> the
> SET commands with the ones from your script, and try again.
>
> -Brad
>
>------------------------------------------------------------------------
>
>CMAKE_MINIMUM_REQUIRED(VERSION 1.6)
>PROJECT(NewProject)
>
>FIND_PACKAGE(Qt)
>FIND_PACKAGE(VTK)
>FIND_PACKAGE(ITK)
>
>IF(VTK_FOUND)
>  INCLUDE(${VTK_USE_FILE})
>ENDIF(VTK_FOUND)
>
>IF(ITK_FOUND)
>  INCLUDE(${ITK_USE_FILE})
>ENDIF(ITK_FOUND)
>
>INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
>
>SET(NewProject_SRCS
>  affichage16coupes.h
>  affichage1coupe.h
>  affichage1vue3D.h
>  affichage4coupes.h
>  affichage4vues.h
>  affichageVTK.h
>  affichageVTK3D.h
>  creationVTK3D.h
>  readerVTK.h
>  traitementITK.h
>  vtkITKUtility.h
>  vtkInteractorStyleCustom.h
>  vtkInteractorStyleDraw.h
>  vtkQGLImageMapper.h
>  vtkQGLImageWindow.h
>  vtkQGLLight.cxx         
>  vtkQGLLight.h
>  vtkQGLPtrToQT.h
>  vtkQGLPtrToVTK.h
>  vtkQGLRenderWindow.h
>  vtkQGLTexture.h
>  vtkQtObjectFactory.h
>  vtkQtOpenGLPolyDataMapper.h
>)
>
>SET(NewProject_MOC_SRCS 
>  newprojectwindow.h
>  vtkQGLRenderWindowInteractor.h
>  vtkQGLWindowQT.h
>  vtkQtOutputWindow.h
>)
>
>IF(QT_WRAP_CPP)
>  QT_WRAP_CPP(NewProject NewProject_SRCS NewProject_MOC_SRCS)
>ENDIF(QT_WRAP_CPP)
>
>ADD_EXECUTABLE(NewProject "${NewProject_SRCS}")
>
>TARGET_LINK_LIBRARIES(NewProject vtkHybrid ITKAlgorithms
>                      ITKNumerics ITKIO
>                      ${QT_QT_LIBRARY})
>  
>




More information about the CMake mailing list