ITK/Release 4/Modularization/Add a module/src/CMakeLists.txt: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
No edit summary
Line 6: Line 6:
    
    
   add_library(ITKFoo ${ITKFoo_SRC})
   add_library(ITKFoo ${ITKFoo_SRC})
   target_link_libraries(ITKFoo  ${ITKFoo_LIBRARIES}) # ${ITKFoo_LIBRARIES} is defined in Foo/CMakeLists.txt
   target_link_libraries(ITKFoo  ITKCommon [...]) # specify all target link libraries
   itk_module_target(ITKFoo)  # itk_module_target() set up the rules for installation and target export of this module
   itk_module_target(ITKFoo)  # itk_module_target() set up the rules for installation and target export of this module
|lang=cmake}}
|lang=cmake}}

Revision as of 14:59, 15 September 2011

<syntaxhighlight lang="cmake">

set(ITKFoo SRC
    itkFoo.cxx
    )
  
 add_library(ITKFoo ${ITKFoo_SRC})
 target_link_libraries(ITKFoo  ITKCommon [...]) # specify all target link libraries
 itk_module_target(ITKFoo)  # itk_module_target() set up the rules for installation and target export of this module

</syntaxhighlight>