Skip to content

Commit ddbc09c

Browse files
committed
DOC: Use real modules for find_package example
Demonstrates relationship between ITKCommon module and ITK::ITKCommonModule target.
1 parent 8f684b1 commit ddbc09c

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

SoftwareGuide/Latex/Introduction/Installation.tex

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -575,10 +575,14 @@ \section{Using ITK as an External Library}%
575575
\small
576576
\begin{minted}[baselinestretch=1,fontsize=\footnotesize,linenos=false,bgcolor=ltgray]{cmake}
577577
set(MINIMUM_ITK_VERSION 6.0)
578-
find_package(ITK ${MINIMUM_ITK_VERSION} REQUIRED COMPONENTS Module1 Module2)
578+
find_package(ITK ${MINIMUM_ITK_VERSION} REQUIRED
579+
COMPONENTS
580+
ITKCommon
581+
ITKSmoothing
582+
)
579583
580584
add_executable(Example Example.cxx)
581-
target_link_libraries(Example ITK::Module1 ITK::Module2)
585+
target_link_libraries(Example ITK::ITKCommonModule ITK::ITKSmoothingModule)
582586
\end{minted}
583587
\normalsize
584588
@@ -593,15 +597,15 @@ \section{Using ITK as an External Library}%
593597
ITKSmoothing
594598
ITKIOImageBase
595599
ITKIONRRD
596-
)
600+
)
597601

598602
add_executable(Example Example.cxx)
599603
target_link_libraries(Example
600-
ITK::MorphologicalContourInterpolation
601-
ITK::ITKSmoothing
602-
ITK::ITKIOImageBase
603-
ITK::ITKIONRRD
604-
)
604+
ITK::MorphologicalContourInterpolationModule
605+
ITK::ITKSmoothingModule
606+
ITK::ITKIOImageBaseModule
607+
ITK::ITKIONRRDModule
608+
)
605609
# or
606610
target_link_libraries(Example ${ITK_INTERFACE_LIBRARIES})
607611
\end{minted}

0 commit comments

Comments
 (0)