@@ -647,13 +647,15 @@ \subsection{Hello World!}%
647647\begin {minted }[linenos=false]{cmake}
648648project(HelloWorld)
649649
650- set(MINIMUM_ITK_VERSION 5.4 )
650+ set(MINIMUM_ITK_VERSION 6.0 )
651651find_package(ITK \$ {MINIMUM_ITK_VERSION} REQUIRED)
652- include($ {ITK_USE_FILE})
652+
653+ # Generate the ITK factory registration code.
654+ itk_generate_factory_registration()
653655
654656add_executable(HelloWorld HelloWorld.cxx)
655657
656- target_link_libraries(HelloWorld $ {ITK_LIBRARIES })
658+ target_link_libraries(HelloWorld $ {ITK_INTERFACE_LIBRARIES })
657659\end {minted}
658660
659661The first line defines the name of your project as it appears in Visual Studio
@@ -663,9 +665,9 @@ \subsection{Hello World!}%
663665corrected by providing the location of the directory where ITK was compiled or
664666installed on your system. In this case the path to the ITK's binary/installation
665667directory needs to be specified as the value of the \code {ITK\_ DIR} CMake
666- variable. The line \code {include( \$\{ USE \_ ITK \_ FILE \} )} loads the
667- \code {UseITK.cmake} file which contains the configuration information about the
668- specified ITK build. The line starting with \code {add\_ executable} call defines
668+ variable. The line \code {itk \_ generate \_ factory \_ registration( )} generates configuration
669+ to enable input-output factory class registration in the subsequent executable.
670+ The line starting with \code {add\_ executable} call defines
669671as its first argument the name of the executable that will be produced
670672as result of this project. The remaining argument(s) of \code {add\_ executable}
671673are the names of the source files to be compiled. Finally, the
0 commit comments