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

From KitwarePublic
Jump to navigationJump to search
(Created page with "project(ITK-Foo) itk_module_impl()")
 
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
project(ITK-Foo)
If this module only contains template source codes (no "src" subdirectory):
itk_module_impl()
{{#tag:syntaxhighlight
|
project(ITKFoo)
 
#itk_module_impl() takes care of the installation and export rule for the
#module ITKFoo
itk_module_impl()
 
|lang=cmake}}
 
 
If this module generates a library (has a "src" subdirectory):
{{#tag:syntaxhighlight
|
  project(ITKFoo)
 
  set(ITKFoo_LIBRARIES ITKFoo) # need to specify the library names
  itk_module_impl()
|lang=cmake}}

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