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

From KitwarePublic
Jump to navigationJump to search
(Created page with " set(ITK-Foo SRC itkFoo.cxx ) add_library(ITK-Foo ${ITK-Foo_SRC}) target_link_libraries(ITK-Foo ${ITK-Foo_LIBRARIES}) ${ITK-Foo_LIBRARIES} is defined in Foo/CMak...")
 
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  set(ITK-Foo SRC
{{#tag:syntaxhighlight
|
  set(ITKFoo SRC
     itkFoo.cxx
     itkFoo.cxx
     )
     )
 
 
   add_library(ITK-Foo ${ITK-Foo_SRC})
   add_library(ITKFoo ${ITKFoo_SRC})
   target_link_libraries(ITK-Foo ${ITK-Foo_LIBRARIES}) ${ITK-Foo_LIBRARIES} is defined in Foo/CMakeLists.txt
   target_link_libraries(ITKFoo ITKCommon [...]) # specify all target link libraries
   itk_module_target(ITK-Foo)  # 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}}

Latest revision as of 16:00, 9 December 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>