ITK/Release 4/Modularization/Add a module/CMakeLists.txt: Difference between revisions
From KitwarePublic
< ITK | Release 4 | Modularization
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
project(ITK-Foo) | project(ITK-Foo) | ||
#itk_module_impl() takes care of the installation and export rule for the #module ITK-Foo | #itk_module_impl() takes care of the installation and export rule for the | ||
itk_module_impl() | #module ITK-Foo | ||
itk_module_impl() | |||
|lang=cmake}} | |lang=cmake}} | ||
Revision as of 15:09, 19 June 2011
If this module only contains template source codes (no "src" subdirectory): <syntaxhighlight lang="cmake">
project(ITK-Foo) #itk_module_impl() takes care of the installation and export rule for the #module ITK-Foo itk_module_impl()
</syntaxhighlight>
If this module generates a library (has a "src" subdirectory):
<syntaxhighlight lang="cmake">
project(ITK-Foo) set(ITK-Foo_LIBRARIES ITK-Foo) # need to specify the library names itk_module_impl()
</syntaxhighlight>