[Insight-developers] cmake

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


Your right, I missed that.

It should look like this:

PROJECT (MyProject)

INCLUDE (${CMAKE_ROOT}/Modules/FindITK.cmake)
IF (USE_ITK_FILE)
  INCLUDE(${USE_ITK_FILE})
ENDIF (USE_ITK_FILE)

ADD_EXECUTABLE(MyProject main.cxx)
TARGET_LINK_LIBRARIES(MyProject ITKIO ITKNumerics)


-Bill

At 10:45 AM 9/25/2002 -0400, Miller, James V (Research) wrote:
>The include paths and library paths are in UseITK.cmake not FindITK.cmake
>
>> -----Original Message-----
>> From: Bill Hoffman [mailto:bill.hoffman@kitware.com]
>> Sent: Wednesday, September 25, 2002 10:39 AM
>> To: Stephen R. Aylward; Insight-Developers (E-mail)
>> Subject: Re: [Insight-developers] cmake
>> 
>> 
>> 
>> 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 )
>> >
>> 
>> 
>> _______________________________________________
>> Insight-developers mailing list
>> Insight-developers@public.kitware.com
>> http://public.kitware.com/mailman/listinfo/insight-developers
>> 
>_______________________________________________
>Insight-developers mailing list
>Insight-developers@public.kitware.com
>http://public.kitware.com/mailman/listinfo/insight-developers