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

From KitwarePublic
Jump to navigationJump to search
Line 2: Line 2:
{{#tag:syntaxhighlight
{{#tag:syntaxhighlight
|
|
  project(ITK-Foo)
  project(ITKFoo)
    
    
  #itk_module_impl() takes care of the installation and export rule for the  
  #itk_module_impl() takes care of the installation and export rule for the  
  #module ITK-Foo
  #module ITKFoo
  itk_module_impl()  
  itk_module_impl()  


Line 14: Line 14:
{{#tag:syntaxhighlight
{{#tag:syntaxhighlight
|
|
   project(ITK-Foo)
   project(ITKFoo)
    
    
   set(ITK-Foo_LIBRARIES ITK-Foo) # need to specify the library names
   set(ITKFoo_LIBRARIES ITKFoo) # need to specify the library names
   itk_module_impl()
   itk_module_impl()
|lang=cmake}}
|lang=cmake}}

Revision as of 15:38, 20 July 2011

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

 project(ITKFoo)
  
 #itk_module_impl() takes care of the installation and export rule for the 
 #module ITKFoo
 itk_module_impl()


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

  project(ITKFoo)
  
  set(ITKFoo_LIBRARIES ITKFoo) # need to specify the library names
  itk_module_impl()