Template:ITKCMakeLists
From KitwarePublic
Revision as of 15:22, 1 August 2011 by Dzenanz (talk | contribs) (→CMakeLists.txt: correct file name)
CMakeLists.txt
<syntaxhighlight lang="cmake"> cmake_minimum_required(VERSION 2.6)
project(ImageFilter)
find_package(ITK REQUIRED) include(${ITK_USE_FILE})
add_executable(ImageFilter ImageFilterExample.cxx)
if( "${ITK_VERSION_MAJOR}" LESS 4 )
target_link_libraries(ImageFilter ITKReview ${ITK_LIBRARIES})
else( "${ITK_VERSION_MAJOR}" LESS 4 )
target_link_libraries(ImageFilter ${ITK_LIBRARIES})
endif( "${ITK_VERSION_MAJOR}" LESS 4 )
</syntaxhighlight>