[Insight-developers] cmake changes

Bill Hoffman bill.hoffman@kitware.com
Fri, 05 Jan 2001 11:51:15 -0500


Hi,

I have just checked in a reworked cmake.   It changed all
of the CMakeLists.txt files in Insight.   The c++ code is
more modular now, and it is easier to extend.

Here are some examples of the new format:


------- top level CMakeLists.txt file ------
PROJECT(ITK)

SUBDIRS(Code Testing)

INCLUDE_DIRECTORIES(
${CMAKE_BINARY_DIR} 
${CMAKE_BINARY_DIR}/Code/Insight3DParty/vxl 
${CMAKE_SOURCE_DIR}/Code/Common 
${CMAKE_SOURCE_DIR}/Code/Insight3DParty/vxl 
)

LINK_DIRECTORIES(
${CMAKE_BINARY_DIR}/Code/Common 
${CMAKE_BINARY_DIR}/Code/Insight3DParty/vxl )

LINK_LIBRARIES (
ITKCommon 
ITKNumerics
)

UNIX_LIBRARIES(
${THREAD_LIBS} 
${DL_LIBS} 
-lm
)


------- Common file CMakeLists.txt file ------

LIBRARY(ITKCommon)

SOURCE_FILES(
itkCommand 
itkDataObject 
itkDirectory 
itkDynamicLoader 
itkExceptionObject 
itkFastMutexLock 
itkImageBase 
itkIndent 
itkLightObject 
itkMeshRegion 
itkMultiThreader 
itkMutexLock 
itkNumericTraits 
itkObject 
itkObjectFactoryBase 
itkOutputWindow 
itkProcessObject 
itkRegion 
itkTimeStamp 
itkVersion 
itkWriter
)


SOURCE_FILES_REQUIRE(WIN32 SOURCES_BEGIN itkWin32OutputWindow)