[Insight-developers] cmake question

Joshua Cates cates@cs.utah.edu
Sat, 2 Mar 2002 16:49:37 -0700 (MST)


Hi,

Suppose I want to build an application "anisodiffuse.cxx" outside of the
Itk source tree.  The following CMakeLists.txt file works:


PROJECT(AD)

FIND_PATH(ITK_BINARY_PATH UseITK.cmake /home/cates/itk/Insight-LINUX)
INCLUDE(/home/cates/itk/Insight-LINUX/UseITK.cmake)

LINK_DIRECTORIES(
${ITK_BINARY_PATH}/Code/Numerics
${ITK_BINARY_PATH}/Code/Common
${ITK_BINARY_PATH}/Code/BasicFilters
${ITK_BINARY_PATH}/Code/IO
${ITK_BINARY_PATH}/Code/Numerics/vxl
)

LINK_LIBRARIES(
ITKIO
ITKBasicFilters
ITKCommon
ITKNumerics
VXLNumerics
)

ADD_EXECUTABLE(anisodiffuse anisodiffuse)



Is there a way to get rid of the LINK_DIRECTORIES and LINK_LIBRARIES
definitions?  UseITK.cmake doesn't supply them all.



Josh.

______________________________
 Josh Cates			
 School of Computer Science	
 University of Utah
 Email: cates@cs.utah.edu
 Phone: (801) 587-7697
 URL:   www.cs.utk.edu/~cates