Template:ITKCMakeLists: Difference between revisions
From KitwarePublic
Jump to navigationJump to search
Hjmjohnson (talk | contribs) (Changed to match style of Current CMake Documentation) |
|||
Line 11: | Line 11: | ||
add_executable({{{1}}} {{{1}}}.cxx) | add_executable({{{1}}} {{{1}}}.cxx) | ||
target_link_libraries({{{1}}} ITKReview ${ITK_LIBRARIES}) | if( "${ITK_VERSION_MAJOR}" LESS 4 ) | ||
target_link_libraries({{{1}}} ITKReview ${ITK_LIBRARIES}) | |||
else( "${ITK_VERSION_MAJOR}" LESS 4 ) | |||
target_link_libraries({{{1}}} ${ITK_LIBRARIES}) | |||
endif( "${ITK_VERSION_MAJOR}" LESS 4 ) | |||
|lang=cmake}} | |lang=cmake}} |
Revision as of 19:50, 4 April 2011
CMakeLists.txt
<syntaxhighlight lang="cmake"> cmake_minimum_required(VERSION 2.6)
project({{{1}}})
find_package(ITK REQUIRED) include(${ITK_USE_FILE})
add_executable({{{1}}} {{{1}}}.cxx)
if( "${ITK_VERSION_MAJOR}" LESS 4 )
target_link_libraries({{{1}}} ITKReview ${ITK_LIBRARIES})
else( "${ITK_VERSION_MAJOR}" LESS 4 )
target_link_libraries({{{1}}} ${ITK_LIBRARIES})
endif( "${ITK_VERSION_MAJOR}" LESS 4 )
</syntaxhighlight>