[Insight-users] SOViewer can't find FILK location.Is it a bug in SOViewer ?

Julien Jomier julien.jomier at kitware.com
Sat Feb 18 15:33:36 EST 2006


Wordon,

Glad to hear that your problem is solved. The message your are getting 
from CMake can be solved by modifying the CMakeLists.txt file as follow

replace

ADD_EXECUTABLE(darcy darcy.cxx
                        DarcyApp.cxx
                        DarcyBase.cxx
                        itkTracer.cxx )

FLTK_WRAP_UI(darcy DarcyGUI.fl)

by

FLTK_WRAP_UI(darcy DarcyGUI.fl)


ADD_EXECUTABLE(darcy darcy.cxx
                      DarcyApp.cxx
                      DarcyBase.cxx
                      itkTracer.cxx
		     ${darcy_FLTK_UI_SRCS}
		     )

Basically you just need to add
${darcy_FLTK_UI_SRCS} to the list of source files.

Hope that helps,

Julien

wordon wrote:
> That problem is solving by using CMake 2.2.3,
> Thank you for your help.
> 
> But,other problem is appeared when I build Darcy project.
> 
> The error message as below :
> 
> In CMake 2.2 the FLTK_WRAP_UI command sets a variable to the list of source
> files that should be added to your executable or library.It appears that you
> have not added these source files to your target.You should change your
> CMakeLists.txt file to directly add the generated files to the target.For
> example FLTK_WRAP_UI(foo src1 src2 src3) will create a variable named
> foo_FLTK_UI_SRCS that contains the list of source to add  to your target
> when you call ADD_LIBRARY or ADD_EXECUTABLE.For now CMake 2.2 will add the
> sources to your target for you as was done in CMake 2.0 and earlier.In the
> future this may become an error.The problem was found while processing the
> source directory:D:/darcy
> 
> Focus on this problem,it seems like I must add a CMake command into the
> CMakeLists.txt.
> 
> But I don't know how to modify it.
> 
> Can you give me some suggestion?  (My CMakeLists.txt is on the attachment)
> 
> 
> Thanks :)
> 
> -----Original Message-----
> From: Julien Jomier [mailto:julien.jomier at kitware.com] 
> Sent: Sunday, February 19, 2006 12:52 AM
> To: wordon
> Subject: Re: [Insight-users] SOViewer can't find FILK location.Is it a bug
> in SOViewer ?
> 
> That might be the problem. Can you upgrade to 2.2.3?
> 
> Julien
> 
> 
> ------------------------------------------------------------------------
> 
> 
> PROJECT(Darcy)
> 
> #---------------------------------------------------------------------------
> 
> FIND_PACKAGE(ITK)
> IF(ITK_FOUND)
>   INCLUDE(${ITK_USE_FILE})
> ELSE(ITK_FOUND)
>   MESSAGE(FATAL_ERROR "Cannot build without ITK.  Please set ITK_DIR.")
> ENDIF(ITK_FOUND)
> 
> FIND_PACKAGE(FLTK)
> IF(FLTK_FOUND)
>   INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
> ELSE(FLTK_FOUND)
>   MESSAGE(FATAL_ERROR "Cannot build without FLTK.  Please set FLTK_DIR.")
> ENDIF(FLTK_FOUND)
> 
> FIND_PACKAGE(VTK)
> IF(VTK_FOUND)
>   INCLUDE (${VTK_USE_FILE})
> ELSE(VTK_FOUND)
>   MESSAGE(FATAL_ERROR "Cannot build without ITK.  Please set VTK_DIR.")
> ENDIF(VTK_FOUND)
> 
> # This should be found as a package
> # --> Change this to point to the correct location
> #SET(SOV_SOURCE_DIR /home/gavinb/projects/ITK/SOViewer)
> #SET(SOV_BINARY_DIR ${SOV_SOURCE_DIR}/Build)
> #INCLUDE(${SOV_SOURCE_DIR}/sovCMakeOptions.cmake)
> 
> FIND_PACKAGE(SOV)
> IF(SOV_FOUND)
>   INCLUDE (${SOV_USE_FILE})
> ELSE(SOV_FOUND)
>   MESSAGE(FATAL_ERROR "Cannot build without SOV.  Please set SOV_DIR.")
> ENDIF(SOV_FOUND)
> 
> 
> # Just so the generated GUI can find the Base class
> INCLUDE_DIRECTORIES(${Darcy_SOURCE_DIR})
> 
> #---------------------------------------------------------------------------
> 
> ADD_EXECUTABLE(TestTriangleCellWithNormalAndCentroid
>         TestTriangleCellWithNormalAndCentroid.cxx)
> 
> TARGET_LINK_LIBRARIES(TestTriangleCellWithNormalAndCentroid
>                       ITKCommon ITKIO)
> 
> #---------------------------------------------------------------------------
> 
> ADD_EXECUTABLE(TestSeashellMeshSource TestSeashellMeshSource.cxx itkTracer.cxx)
> 
> TARGET_LINK_LIBRARIES(TestSeashellMeshSource
>                       ITKCommon ITKIO)
> 
> #---------------------------------------------------------------------------
> 
> ADD_EXECUTABLE(TestRenderMeshSource TestRenderMeshSource.cxx itkTracer.cxx)
> 
> TARGET_LINK_LIBRARIES(TestRenderMeshSource
>                       ITKCommon ITKIO)
> 
> #---------------------------------------------------------------------------
> 
> ADD_EXECUTABLE(darcy darcy.cxx 
>                        DarcyApp.cxx 
>                        DarcyBase.cxx
>                        itkTracer.cxx )
> 
> TARGET_LINK_LIBRARIES(darcy 
>                       ITKCommon ITKIO ITKSpatialObject
>                       SOViewer
>                       ${GLU_LIBRARY}
>                       ${GLUT_LIBRARY}
>                       ${FLTK_LIBRARY} )
> 
> FLTK_WRAP_UI(darcy DarcyGUI.fl)
> 
> #---------------------------------------------------------------------------



More information about the Insight-users mailing list