Skip to content

Commit c596298

Browse files
committed
ENH: Update the examples directory to build against ITK.
1 parent 50380b8 commit c596298

File tree

2 files changed

+15
-30
lines changed

2 files changed

+15
-30
lines changed

examples/CMakeLists.txt

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
1-
# The header files
2-
SET(HEADERS
3-
${CMAKE_SOURCE_DIR}/include/itkImageToPathFilter.h
4-
${CMAKE_SOURCE_DIR}/include/itkSingleImageCostFunction.h
5-
${CMAKE_SOURCE_DIR}/include/itkArrivalFunctionToPathFilter.h
6-
${CMAKE_SOURCE_DIR}/include/itkSpeedFunctionToPathFilter.h
7-
${CMAKE_SOURCE_DIR}/include/itkImageToPathFilter.hxx
8-
${CMAKE_SOURCE_DIR}/include/itkSingleImageCostFunction.hxx
9-
${CMAKE_SOURCE_DIR}/include/itkArrivalFunctionToPathFilter.hxx
10-
${CMAKE_SOURCE_DIR}/include/itkSpeedFunctionToPathFilter.hxx
11-
)
1+
cmake_minimum_required(VERSION 2.8)
2+
project(MinimalPathExtractionExamples)
123

13-
# Add this as include directory
14-
INCLUDE_DIRECTORIES(
15-
${CMAKE_SOURCE_DIR}
16-
)
4+
find_package(ITK REQUIRED
5+
COMPONENTS MinimalPathExtraction
6+
ITKIOImageBase
7+
ITKImageFunction
8+
ITKOptimizers
9+
ITKPath
10+
ITKIOMeta
11+
ITKIOPNG
12+
ITKIOJPEG
13+
)
1714

18-
# Main library
19-
ADD_EXECUTABLE(MinimalPathMain main.cxx ${HEADERS} )
20-
TARGET_LINK_LIBRARIES(MinimalPathMain ${ITK_LIBRARIES})
15+
include(${ITK_USE_FILE})
2116

22-
ADD_EXECUTABLE(MinimalPathExamples example.cxx ${HEADERS} )
23-
TARGET_LINK_LIBRARIES(MinimalPathExamples ${ITK_LIBRARIES})
17+
add_executable(MinimalPathExamples example.cxx)
18+
target_link_libraries(MinimalPathExamples ${ITK_LIBRARIES})

examples/main.cxx

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)