[Insight-developers] cmake

Bill Hoffman bill.hoffman@kitware.com
Wed, 25 Sep 2002 10:39:15 -0400


It should add all the include paths and library paths, but not the libraries.
The users should specifiy only the libraries directly used by the application.
CMake now knows which libraries need each other.  So, the above should work with
one added line:

TARGET_LINK_LIBRARIES(MyProject ITKNumerics ITKIO)

(Assuming the project used ITKNumerics and ITKIO directly.   Cmake will
add all the other libraries used by ITKNumerics and ITKIO.)  We don't want
to force folks to link in libraries they are not using.

If the include paths and library path is not being added, I will fix it.

-Bill


At 10:14 AM 9/25/2002 -0400, Stephen R. Aylward wrote:

>Hi,
>
>If someone does a FindITK.cmake, shouldn't we assume that they want to include ITK paths and libraries?
>
>There are arguments against this, but perhaps it would be nice if the following CMakeLists.txt file was sufficient to compile an ITK program out of source...
>
>PROJECT(MyProject)
>
>INCLUDE (${CMAKE_ROOT}/Modules/FindITK.cmake)
>
>SET ( MYPROJECT_SRCS
>main.cxx
>)
>
>ADD_EXECUTABLE( MyProject MYPROJECT_SRCS )
>