[Insight-users] (no subject)

Luis Ibanez luis . ibanez at kitware . com
Mon, 04 Aug 2003 12:00:09 -0400


Hi Adolfo,

Thanks for sending your CMakeLists.txt file.

What version of ITK are you using  ?

The following CMakeLists.txt and .cxx files
worked fine for me. (Note the addition of
ITKNumerics, although in the latest cvs
version this is not necessary, ITKCommon
should pull up the dependencies.)

Please give it a try to these two files
and let us know if you continue experiencing
any problems.


You may also find useful the Installation
section in the SoftwareGuide
http://www . itk . org/ItkSoftwareGuide . pdf
Section 2.2.1, pdf-page 39

Regards,


   Luis


--------------------------------------
PROJECT(myProject)

FIND_PACKAGE(ITK)
IF(ITK_FOUND)
	INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
	MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.")
ENDIF(ITK_FOUND)

ADD_EXECUTABLE(myProject pruebaitk.cpp )

TARGET_LINK_LIBRARIES(myProject ITKCommon ITKNumerics)
----------------------------------------
#include "itkMatrix.h"
int main()
{
   typedef itk::Matrix< double, 3, 3 > MatrixType;
   MatrixType matrix;
   return 0;
}
-----------------------------


fito at unizar . es wrote:
> Hi Luis
> 
> This is the CMakeLists.txt file
> 
> I've tried with remarked (#) lines first and then with the others. The same 
> results. 
> 
> ---------------------------------------------------------------
> PROJECT(myProject)
> 
> FIND_PACKAGE(ITK)
> IF(ITK_FOUND)
> 	INCLUDE(${ITK_USE_FILE})
> ELSE(ITK_FOUND)
> 	MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.")
> ENDIF(ITK_FOUND)
> 
> #INCLUDE (${CMAKE_ROOT}/Modules/FindITK.cmake)
> 
> #IF ( USE_ITK_FILE )
> #INCLUDE(${USE_ITK_FILE})
> #ENDIF( USE_ITK_FILE )
> 
> ADD_EXECUTABLE(myProject pruebaitk.cpp )
> 
> TARGET_LINK_LIBRARIES(myProject ITKCommon)
> 
> #TARGET_LINK_LIBRARIES (myProject ${ITK_LIBRARIES})
> ---------------------------------------------------------------
> 
> Thanks for the advice about editting VC environments. I'll try to learn more 
> about CMakeLists config.
> 
> Thanks!
> Adolfo G.U.
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>