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 |
Daviddoria (talk | contribs) m (moved ITK Release 4/Modularization/Add a module/CMakeLists.txt to ITK/Release 4/Modularization/Add a module/CMakeLists.txt) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
{{#tag:syntaxhighlight | {{#tag:syntaxhighlight | ||
| | | | ||
project( | project(ITKFoo) | ||
#itk_module_impl() takes care of the installation and export rule for the #module | #itk_module_impl() takes care of the installation and export rule for the | ||
itk_module_impl() | #module ITKFoo | ||
itk_module_impl() | |||
|lang=cmake}} | |lang=cmake}} | ||
Line 12: | Line 14: | ||
{{#tag:syntaxhighlight | {{#tag:syntaxhighlight | ||
| | | | ||
project( | project(ITKFoo) | ||
set( | set(ITKFoo_LIBRARIES ITKFoo) # need to specify the library names | ||
itk_module_impl() | itk_module_impl() | ||
|lang=cmake}} | |lang=cmake}} |
Latest revision as of 16:00, 9 December 2011
If this module only contains template source codes (no "src" subdirectory): <syntaxhighlight lang="cmake">
project(ITKFoo) #itk_module_impl() takes care of the installation and export rule for the #module ITKFoo itk_module_impl()
</syntaxhighlight>
If this module generates a library (has a "src" subdirectory):
<syntaxhighlight lang="cmake">
project(ITKFoo) set(ITKFoo_LIBRARIES ITKFoo) # need to specify the library names itk_module_impl()
</syntaxhighlight>