Difference between revisions of "ITK/Release 4/Modularization/Add a module/CMakeLists.txt"

From KitwarePublic
Jump to navigationJump to search
Line 1: Line 1:
If this module only contains template source codes (no "src" subdirectory):  
If this module only contains template source codes (no "src" subdirectory):  
{{#tag:syntaxhighlight
|
  project(ITK-Foo)
  project(ITK-Foo)
    
    
  itk_module_impl() #itk_module_impl() takes care of the installation and export rule for the module ITK-Foo
  itk_module_impl() #itk_module_impl() takes care of the installation and export rule for the module ITK-Foo
|lang=cmake}}




If this module generates a library (has a "src" subdirectory):
If this module generates a library (has a "src" subdirectory):
{{#tag:syntaxhighlight
|
   project(ITK-Foo)
   project(ITK-Foo)
    
    
   set(ITK-Foo_LIBRARIES ITK-Foo) # need to specify the library names
   set(ITK-Foo_LIBRARIES ITK-Foo) # need to specify the library names
   itk_module_impl()
   itk_module_impl()
|lang=cmake}}

Revision as of 14:50, 19 June 2011

If this module only contains template source codes (no "src" subdirectory):

 project(ITK-Foo)
  
 itk_module_impl() #itk_module_impl() takes care of the installation and export rule for the module ITK-Foo


If this module generates a library (has a "src" subdirectory):

  project(ITK-Foo)
  
  set(ITK-Foo_LIBRARIES ITK-Foo) # need to specify the library names
  itk_module_impl()