Skip to content

Commit 9b71fbe

Browse files
committed
COMP: Update examples to the new build system to avoid warnings
Warning that was triggered: CMake Warning (dev) at CMake/UseITK.cmake:28 (message): CMake/UseITK.cmake is deprecated. Please update CMakeLists.txt to use `find_package(ITK)` and link to "${ITK_INTERFACE_LIBRARIES}". Call Stack (most recent call first): Modules/Remote/Montage/examples/CMakeLists.txt:23 (include) This warning is for project developers. Use -Wno-dev to suppress it.
1 parent 9aafc48 commit 9b71fbe

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

examples/CMakeLists.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,24 @@ else()
2020
# lists of modules are not yet ready, causing a configure error
2121
find_package(ITK REQUIRED COMPONENTS ${ExampleSpecificComponents})
2222
endif()
23-
include(${ITK_USE_FILE})
2423

2524
add_executable(PhaseCorrelationImageRegistration PhaseCorrelationImageRegistration.cxx)
26-
target_link_libraries(PhaseCorrelationImageRegistration ${ITK_LIBRARIES})
25+
target_link_libraries(PhaseCorrelationImageRegistration ${ITK_INTERFACE_LIBRARIES})
2726

2827
add_executable(CompleteMontage CompleteMontage.cxx)
29-
target_link_libraries(CompleteMontage ${ITK_LIBRARIES})
28+
target_link_libraries(CompleteMontage ${ITK_INTERFACE_LIBRARIES})
3029

3130
add_executable(RefineMontage RefineMontage.cxx)
32-
target_link_libraries(RefineMontage ${ITK_LIBRARIES})
31+
target_link_libraries(RefineMontage ${ITK_INTERFACE_LIBRARIES})
3332

3433
add_executable(ResampleMontage ResampleMontage.cxx)
35-
target_link_libraries(ResampleMontage ${ITK_LIBRARIES})
34+
target_link_libraries(ResampleMontage ${ITK_INTERFACE_LIBRARIES})
3635

3736
add_executable(CompareTileConfigurations CompareTileConfigurations.cxx)
38-
target_link_libraries(CompareTileConfigurations ${ITK_LIBRARIES})
37+
target_link_libraries(CompareTileConfigurations ${ITK_INTERFACE_LIBRARIES})
3938

4039
add_executable(MontageImageCompareCommand MontageImageCompareCommand.cxx)
41-
target_link_libraries(MontageImageCompareCommand ${ITK_LIBRARIES})
40+
target_link_libraries(MontageImageCompareCommand ${ITK_INTERFACE_LIBRARIES})
4241

4342

4443
# add some regression tests

0 commit comments

Comments
 (0)