[Insight-users] Problem FLTK CMakeLists.txt

M. Elena Martinez elena at leibniz.iimas.unam.mx
Tue Mar 7 06:29:56 EST 2006


Dear all,

I am trying to compile an application using FLTK following the
examples from "Mophogenesis" or "Curves2DExtractor"

Apparently I cannot manage to get a proper CMakeLists.txt

my project is called:    RISA_ITK
and I have 4 cxx files:  RisaAppGUI.cxx
			 RisaAppBase.cxx
		    	 RisaApp.cxx
			 main.cxx

and I install the FltkImageViewer library at:
/home/elena/ITK/Applications-2.2.0/Auxiliary/FltkImageViewer

My CMakeList.txt is as follows:

PROJECT(RISA_ITK)

FIND_PACKAGE(ITK)
IF(ITK_FOUND)
  INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
  MESSAGE(FATAL_ERROR "Cannot build InsightApplications without ITK.  Please set ITK_DIR.")
ENDIF(ITK_FOUND)

FIND_PACKAGE(FLTK)
IF(FLTK_FOUND)
  INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
ENDIF(FLTK_FOUND)

SET(InsightApplications_SOURCE_DIR
    /home/elena/ITK/InsightApplications-2.2.0)

SET(InsightApplications_BINARY_DIR
    /home/elena/ITK/InsightApplications-2.2.0)

SET(MY_WORK
    /home/elena/ProyectosITK/ICCH)

INCLUDE_DIRECTORIES(
  ${InsightApplications_SOURCE_DIR}/Auxiliary/FltkImageViewer
  ${InsightApplications_BINARY_DIR}/Auxiliary/FltkImageViewer
  ${MY_WORK}/RISA_ITK
)

SET(RISA_ITK_SRCS
  RisaAppGUI.cxx
  RisaAppBase.cxx
  RisaApp.cxx
  main.cxx
  )

ADD_EXECUTABLE(RISA_ITK "${RISA_ITK_SRCS}")
#ADD_EXECUTABLE(RISA_ITK main.cxx)

IF (FLTK_FOUND)
  FLTK_WRAP_UI( RISA_ITK RisaAppGUI.fl )
ENDIF(FLTK_FOUND)

#ITK_DISABLE_FLTK_GENERATED_WARNINGS(RisaAppGUI.fl)

TARGET_LINK_LIBRARIES (RISA_ITK ITKIO ITKBasicFilters
  ITKNumerics ITKCommon ITKFltkImageViewer
  ${FLTK_LIBRARIES})



The errors I get are as follows:


elena at greta:~/ProyectosITK/ICCH/RISA_ITK$ cmake .
-- Check for working C compiler: gcc -- works
-- Check for working CXX compiler: c++ -- works
CMake Error: can not find file /home/elena/ProyectosITK/ICCH/RISA_ITK/
RisaAppGUI.cxx;RisaAppBase.cxx;RisaApp.cxx;main.cxx

Tried .c .C .c++ .cc .cpp .cxx .m .M .mm .h .h++ .hm .hpp .hxx .in .txx
-- Configuring done
elena at greta:~/ProyectosITK/ICCH/RISA_ITK$ make
Building dependencies. cmake.depends...
CMake Error: can not find file /home/elena/ProyectosITK/ICCH/RISA_ITK/
RisaAppGUI.cxx;RisaAppBase.cxx;RisaApp.cxx;main.cxx

Tried .c .C .c++ .cc .cpp .cxx .m .M .mm .h .h++ .hm .hpp .hxx .in .txx
make: *** [cmake.depends] Error 255
elena at greta:~/ProyectosITK/ICCH/RISA_ITK$


Please somebody help!!

Many thanks


Elena



More information about the Insight-users mailing list