<P>
Hi Luis,<BR>
This the CmakeLists.txt I have comfigured for HelloWorld example.<BR>
<BR>
PROJECT(HelloWorld) <BR>
FIND_PACKAGE(ITK) <BR>
IF(ITK_FOUND) <BR>
INCLUDE(${ITK_USE_FILE})<BR>
ELSE(ITK_FOUND)<BR>
MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.")<BR>
ENDIF(ITK_FOUND) <BR>
ADD_EXECUTABLE(HelloWorld HelloWorld.cxx ) <BR>
TARGET_LINK_LIBRARIES(HelloWorld ITKCommon)<BR>
<BR>
and this is the CmakeCacge.txt which was generated<BR>
<BR>
# This is the CMakeCache file.<BR>
# For build in directory: /IPLlinux/gaba+raid0/homes/vjammala/newitk<BR>
# You can edit this file to change values found and used by cmake.<BR>
# If you do not want to change any of the values, simply exit the editor.<BR>
# If you do want to change a value, simply edit, save, and exit the editor.<BR>
# The syntax for the file is as follows:<BR>
# KEY:TYPE=VALUE<BR>
# KEY is the name of a variable in the cache.<BR>
# TYPE is a hint to GUI's for the type of VALUE, DO NOT EDIT TYPE!.<BR>
# VALUE is the current value for the KEY.<BR>
<BR>
########################<BR>
# EXTERNAL cache entries<BR>
########################<BR>
<BR>
//Path to a program.<BR>
CMAKE_AR:FILEPATH=/usr/bin/ar<BR>
<BR>
//For backwards compatibility, what version of CMake commands and<BR>
// syntax should this version of CMake allow.<BR>
CMAKE_BACKWARDS_COMPATIBILITY:STRING=1.8.3<BR>
<BR>
//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or<BR>
// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.<BR>
//<BR>
CMAKE_BUILD_TYPE:STRING=<BR>
<BR>
//C++ compiler<BR>
CMAKE_CXX_COMPILER:STRING=c++<BR>
<BR>
//Flags used by the compiler during all build types.<BR>
CMAKE_CXX_FLAGS:STRING=<BR>
<BR>
//Flags used by the compiler during debug builds.<BR>
CMAKE_CXX_FLAGS_DEBUG:STRING=-g<BR>
<BR>
//Flags used by the compiler during release minsize builds.<BR>
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG<BR>
<BR>
//Flags used by the compiler during release builds (/MD /Ob1 /Oi<BR>
// /Ot /Oy /Gs will produce slightly less optimized but smaller<BR>
// files).<BR>
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG<BR>
<BR>
//Flags used by the compiler during Release with Debug Info builds.<BR>
//<BR>
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g<BR>
<BR>
//C compiler<BR>
CMAKE_C_COMPILER:STRING=gcc<BR>
<BR>
//Flags for C compiler.<BR>
CMAKE_C_FLAGS:STRING=<BR>
<BR>
//Flags used by the compiler during debug builds.<BR>
CMAKE_C_FLAGS_DEBUG:STRING=-g<BR>
<BR>
//Flags used by the compiler during release minsize builds.<BR>
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG<BR>
<BR>
//Flags used by the compiler during release builds (/MD /Ob1 /Oi<BR>
// /Ot /Oy /Gs will produce slightly less optimized but smaller<BR>
// files).<BR>
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG<BR>
<BR>
//Flags used by the compiler during Release with Debug Info builds.<BR>
//<BR>
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g<BR>
<BR>
//Flags used by the linker.<BR>
CMAKE_EXE_LINKER_FLAGS:STRING=<BR>
<BR>
//Flags used by the linker during debug builds.<BR>
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=<BR>
<BR>
//Flags used by the linker during release minsize builds.<BR>
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=<BR>
<BR>
//Flags used by the linker during release builds.<BR>
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=<BR>
<BR>
//Flags used by the linker during Release with Debug Info builds.<BR>
//<BR>
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=<BR>
<BR>
//Install path prefix, prepended onto install directories.<BR>
CMAKE_INSTALL_PREFIX:PATH=/usr/local<BR>
<BR>
//Path to a program.<BR>
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake<BR>
<BR>
//Flags used by the linker during the creation of modules.<BR>
CMAKE_MODULE_LINKER_FLAGS:STRING=<BR>
<BR>
//Flags used by the linker during debug builds.<BR>
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=<BR>
<BR>
//Flags used by the linker during release minsize builds.<BR>
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=<BR>
<BR>
//Flags used by the linker during release builds.<BR>
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=<BR>
<BR>
//Flags used by the linker during Release with Debug Info builds.<BR>
//<BR>
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=<BR>
<BR>
//Path to a program.<BR>
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib<BR>
<BR>
//Flags used by the linker during the creation of dll's.<BR>
CMAKE_SHARED_LINKER_FLAGS:STRING=<BR>
<BR>
//Flags used by the linker during debug builds.<BR>
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=<BR>
<BR>
//Flags used by the linker during release minsize builds.<BR>
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=<BR>
<BR>
//Flags used by the linker during release builds.<BR>
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=<BR>
<BR>
//Flags used by the linker during Release with Debug Info builds.<BR>
//<BR>
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=<BR>
<BR>
//If set, runtime paths are not added when using shared libraries.<BR>
//<BR>
CMAKE_SKIP_RPATH:BOOL=OFF<BR>
<BR>
//If true, cmake will use relative paths in makefiles and projects.<BR>
//<BR>
CMAKE_USE_RELATIVE_PATHS:BOOL=OFF<BR>
<BR>
//If this value is on, makefiles will be generated without the<BR>
// .SILENT directive, and all commands will be echoed to the console<BR>
// during the make. This is useful for debugging only. With Visual<BR>
// Studio IDE projects all commands are done without /nologo.<BR>
CMAKE_VERBOSE_MAKEFILE:BOOL=OFF<BR>
<BR>
//Single output directory for building all executables.<BR>
EXECUTABLE_OUTPUT_PATH:PATH=<BR>
<BR>
//Value Computed by CMake<BR>
HelloWorld_BINARY_DIR:STATIC=/IPLlinux/gaba+raid0/homes/vjammala/newitk<BR>
<BR>
//Value Computed by CMake<BR>
HelloWorld_SOURCE_DIR:STATIC=/IPLlinux/gaba+raid0/homes/vjammala/newitk<BR>
<BR>
//The directory containing ITKConfig.cmake. This is either the<BR>
// root of the build tree, or PREFIX/lib/InsightToolkit for an<BR>
// installation.<BR>
ITK_DIR:PATH=/radi0/homes/vjammala/Documents/Insight/InsightToolkit-1.8.0<BR>
<BR>
//Single output directory for building all libraries.<BR>
LIBRARY_OUTPUT_PATH:PATH=<BR>
<BR>
<BR>
########################<BR>
# INTERNAL cache entries<BR>
########################<BR>
<BR>
//Advanced flag for variable: CMAKE_AR<BR>
CMAKE_AR-ADVANCED:INTERNAL=1<BR>
//Modified flag for variable: CMAKE_BACKWARDS_COMPATIBILITY<BR>
CMAKE_BACKWARDS_COMPATIBILITY-MODIFIED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_BUILD_TOOL<BR>
CMAKE_BUILD_TOOL-ADVANCED:INTERNAL=1<BR>
//What is the target build tool cmake is generating for.<BR>
CMAKE_BUILD_TOOL:INTERNAL=/usr/bin/gmake<BR>
//This is the directory where this CMakeCahe.txt was created<BR>
CMAKE_CACHEFILE_DIR:INTERNAL=/IPLlinux/gaba+raid0/homes/vjammala/newitk<BR>
//Major version of cmake used to create the current loaded cache<BR>
//<BR>
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=2<BR>
//Minor version of cmake used to create the current loaded cache<BR>
//<BR>
CMAKE_CACHE_MINOR_VERSION:INTERNAL=1<BR>
//Major version of cmake used to create the current loaded cache<BR>
//<BR>
CMAKE_CACHE_RELEASE_VERSION:INTERNAL=development<BR>
//Path to CMake executable.<BR>
CMAKE_COMMAND:INTERNAL=/usr/local/brains2/bin/cmake<BR>
//Path to ctest program executable.<BR>
CMAKE_CTEST_COMMAND:INTERNAL=/usr/local/brains2/bin/ctest<BR>
//Advanced flag for variable: CMAKE_CXX_COMPILER<BR>
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1<BR>
//full path to the compiler cmake found<BR>
CMAKE_CXX_COMPILER_FULLPATH:INTERNAL=/usr/bin/c++<BR>
//Result of TRY_COMPILE<BR>
CMAKE_CXX_COMPILER_WORKS:INTERNAL=TRUE<BR>
//Advanced flag for variable: CMAKE_CXX_FLAGS<BR>
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_CXX_FLAGS_DEBUG<BR>
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_CXX_FLAGS_MINSIZEREL<BR>
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_CXX_FLAGS_RELEASE<BR>
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO<BR>
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_C_COMPILER<BR>
CMAKE_C_COMPILER-ADVANCED:INTERNAL=1<BR>
//full path to the compiler cmake found<BR>
CMAKE_C_COMPILER_FULLPATH:INTERNAL=/usr/bin/gcc<BR>
//Result of TRY_COMPILE<BR>
CMAKE_C_COMPILER_WORKS:INTERNAL=TRUE<BR>
//Advanced flag for variable: CMAKE_C_FLAGS<BR>
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_C_FLAGS_DEBUG<BR>
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_C_FLAGS_MINSIZEREL<BR>
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_C_FLAGS_RELEASE<BR>
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_C_FLAGS_RELWITHDEBINFO<BR>
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1<BR>
//Path to cache edit program executable.<BR>
CMAKE_EDIT_COMMAND:INTERNAL=/usr/local/brains2/bin/ccmake<BR>
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS<BR>
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG<BR>
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL<BR>
//<BR>
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE<BR>
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO<BR>
//<BR>
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1<BR>
//Name of generator.<BR>
CMAKE_GENERATOR:INTERNAL=Unix Makefiles<BR>
//Start directory with the top level CMakeLists.txt file for this<BR>
// project<BR>
CMAKE_HOME_DIRECTORY:INTERNAL=/IPLlinux/gaba+raid0/homes/vjammala/newitk<BR>
//Advanced flag for variable: CMAKE_MAKE_PROGRAM<BR>
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS<BR>
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG<BR>
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL<BR>
//<BR>
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE<BR>
//<BR>
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO<BR>
//<BR>
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_RANLIB<BR>
CMAKE_RANLIB-ADVANCED:INTERNAL=1<BR>
//Path to CMake installation.<BR>
CMAKE_ROOT:INTERNAL=/usr/local/brains2/share/CMake<BR>
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS<BR>
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG<BR>
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL<BR>
//<BR>
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE<BR>
//<BR>
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO<BR>
//<BR>
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_SKIP_RPATH<BR>
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1<BR>
//uname command<BR>
CMAKE_UNAME:INTERNAL=/bin/uname<BR>
//Advanced flag for variable: CMAKE_USE_RELATIVE_PATHS<BR>
CMAKE_USE_RELATIVE_PATHS-ADVANCED:INTERNAL=1<BR>
//Advanced flag for variable: CMAKE_VERBOSE_MAKEFILE<BR>
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1<BR>
//Path to an executable<BR>
HelloWorld_CMAKE_PATH:INTERNAL=/IPLlinux/gaba+raid0/homes/vjammala/newitk<BR>
//Modified flag for variable: ITK_DIR<BR>
ITK_DIR-MODIFIED:INTERNAL=1<BR>
<BR>
Thanks<BR>
vamsi<BR>
<BR>
<BR>
<BR>
<BR>
On Wed, 01 Sep 2004 Luis Ibanez wrote :<BR>
><BR>
>Hi Vamsi,<BR>
><BR>
>Please post to the list the full CMakeLists.txt file<BR>
>that you configured for the "Hello World" example.<BR>
><BR>
>Post also the CMakeCache.txt file that CMake generated<BR>
>in the binary directory where you are trying to build<BR>
>the "Hello World" example.<BR>
><BR>
><BR>
> Thanks<BR>
><BR>
><BR>
> Luis<BR>
><BR>
><BR>
>-----------------------<BR>
>jai vamsi krishna wrote:<BR>
><BR>
>>Hi<BR>
>> Iam new to Itk. Iam trying to install Insight in linux and I followed all the steps listed in the software guide. but when I try to run my first program HelloWorld . There are 2 error messages as follows<BR>
>><BR>
>> CMake Error: Error in cmake code at<BR>
>>.../share/CMake/Modules/FindITK.cmake:80:<BR>
>> INCLUDE Could not find include file:<BR>
>> CMake Error: Error in cmake code at<BR>
>> .../CMakeLists.txt:7:<BR>
>> INCLUDE called with wrong number of arguments. Include only takes one file.<BR>
>><BR>
>>Ive built the itk library and also Ive set the ITK_DIR path to the binary directory where Ive built ITK.<BR>
>>I want to know where Iam wrong. Can any one please help me?<BR>
>>Thanks in advance<BR>
>>vamsi<BR>
>><BR>
>><BR>
>><BR>
>>------------------------------------------------------------------------<BR>
>><BR>
>>_______________________________________________<BR>
>>Insight-users mailing list<BR>
>>Insight-users@itk.org<BR>
>>http://www.itk.org/mailman/listinfo/insight-users<BR>
><BR>
><BR>
><BR>
><BR>
</P>
<br><br>
<A target="_blank" HREF="http://clients.rediff.com/signature/track_sig.asp"><IMG SRC="http://ads.rediff.com/RealMedia/ads/adstream_nx.cgi/www.rediffmail.com/inbox.htm@Bottom" BORDER=0 VSPACE=0 HSPACE=0></a>