<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7650.28">
<TITLE>Problems with Cmake and ImageViewer application</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Hi all,<BR>
<BR>
I am trying out the image viewer application. I have built FLTK already and ITK already, and everything seems to be running ok. But I am experiencing the following errors when configuring using CMAKE:<BR>
<BR>
<BR>
CMake Error: Cannot find source file<BR>
&quot;C:/InsightToolkit-2.8.1/2D/AppImageViewer/ImageViewer.cxx;C:/InsightToolkit-2.8.1/2D/<BR>
AppImageViewer/binaries/ImageViewerGUI.cxx for target &quot;ImageViewer&quot;<BR>
<BR>
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .h++ .hm .hpp .hxx .in .txx<BR>
<BR>
Can anyone help me on this? Thanks in advance.<BR>
<BR>
I am also attaching my cMakeList code below:<BR>
<BR>
PROJECT(ImageViewer)<BR>
<BR>
#IF( BUILD_OUTSIDE_INSIGHT_APPLICATIONS )<BR>
<BR>
&nbsp; FIND_PACKAGE(ITK)<BR>
&nbsp; IF(ITK_FOUND)<BR>
&nbsp;&nbsp;&nbsp; INCLUDE(${ITK_USE_FILE})<BR>
&nbsp; ELSE(ITK_FOUND)<BR>
&nbsp;&nbsp;&nbsp; MESSAGE(FATAL_ERROR<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Cannot build InsightApplications without ITK.&nbsp; Please set ITK_DIR.&quot;)<BR>
&nbsp; ENDIF(ITK_FOUND)<BR>
<BR>
FIND_PACKAGE(FLTK)<BR>
IF (FLTK_FOUND)<BR>
&nbsp; INCLUDE_DIRECTORIES (${FLTK_INCLUDE_DIR})<BR>
ELSE (FLTK_FOUND)<BR>
&nbsp; MESSAGE( FATAL_ERROR &quot;This application requires FLTK. One of these<BR>
components is missing. Please verify configuration&quot;)<BR>
ENDIF (FLTK_FOUND)<BR>
<BR>
#ENDIF( BUILD_OUTSIDE_INSIGHT_APPLICATIONS )<BR>
<BR>
INCLUDE_DIRECTORIES (<BR>
&nbsp; ${ImageViewer_SOURCE_DIR}/Auxiliary/FltkImageViewer<BR>
)<BR>
<BR>
LINK_LIBRARIES (<BR>
&nbsp; ITKBasicFilters<BR>
&nbsp; ITKIO<BR>
&nbsp; ITKFltkImageViewer<BR>
)<BR>
<BR>
<BR>
SET(ImageViewer_GUI_SRCS<BR>
&nbsp; ImageViewerGUI.fl<BR>
&nbsp; )<BR>
<BR>
FLTK_WRAP_UI( ImageViewer ${ImageViewer_GUI_SRCS} )<BR>
#ITK_DISABLE_FLTK_GENERATED_WARNINGS(&quot;${ImageViewer_GUI_SRCS}&quot;)<BR>
<BR>
SET ( ImageViewer_SRCS<BR>
&nbsp; ImageViewer.cxx<BR>
&nbsp; ${ImageViewer_FLTK_UI_SRCS}<BR>
&nbsp; )<BR>
<BR>
ADD_EXECUTABLE( ImageViewer &quot;${ImageViewer_SRCS}&quot; )<BR>
<BR>
<BR>
Regards<BR>
Zheying</FONT>
</P>

</BODY>
</HTML>