Skip to content

Commit

Permalink
STYLE: Use ${PROJECT_NAME} as CMake target name of example projects
Browse files Browse the repository at this point in the history
Replaced `add_executable\(\S+` with `add_executable\(\${PROJECT_NAME}`,
replaced `install\(TARGETS \S+` with `install\(TARGETS \${PROJECT_NAME}`,
and `target_link_libraries\(\S+` with `target_link_libraries\${PROJECT_NAME}`,
using Notepad++ v8.3.3, Find in Files (Regular expression, Filters:
`CMake*.txt`).

This makes the convention of using the project name as target name explicit.
  • Loading branch information
N-Dekker committed May 25, 2022
1 parent 8cbc927 commit 8138ab7
Show file tree
Hide file tree
Showing 409 changed files with 1,317 additions and 1,317 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ find_package(ITK REQUIRED)
include(${ITK_USE_FILE})


add_executable(ConvertAnRGBitkImageTovtkImageData Code.cxx)
target_link_libraries(ConvertAnRGBitkImageTovtkImageData ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS ConvertAnRGBitkImageTovtkImageData
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Bridge/VtkGlue
COMPONENT Runtime
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ find_package(ITK REQUIRED)
include(${ITK_USE_FILE})


add_executable(ConvertAnitkImageTovtkImageData Code.cxx)
target_link_libraries(ConvertAnitkImageTovtkImageData ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS ConvertAnitkImageTovtkImageData
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Bridge/VtkGlue
COMPONENT Runtime
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ find_package(ITK REQUIRED)
include(${ITK_USE_FILE})


add_executable(ConvertRGBvtkImageDataToAnitkImage Code.cxx)
target_link_libraries(ConvertRGBvtkImageDataToAnitkImage ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS ConvertRGBvtkImageDataToAnitkImage
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Bridge/VtkGlue
COMPONENT Runtime
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
endif()

add_executable(ConvertvtkImageDataToAnitkImage Code.cxx)
target_link_libraries(ConvertvtkImageDataToAnitkImage
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME}
${ITK_LIBRARIES}
${VTK_LIBRARIES}
)
Expand All @@ -27,7 +27,7 @@ if(NOT VTK_VERSION VERSION_LESS "8.90.0")
)
endif()

install(TARGETS ConvertvtkImageDataToAnitkImage
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Bridge/VtkGlue
COMPONENT Runtime
)
Expand Down
6 changes: 3 additions & 3 deletions src/Bridge/VtkGlue/VTKImageToITKImage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
endif()

add_executable(VTKImageToITKImage Code.cxx)
target_link_libraries(VTKImageToITKImage ${ITK_LIBRARIES} ${VTK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES} ${VTK_LIBRARIES})

if(NOT VTK_VERSION VERSION_LESS "8.90.0")
vtk_module_autoinit(
Expand All @@ -31,7 +31,7 @@ if(NOT VTK_VERSION VERSION_LESS "8.90.0")
)
endif()

install(TARGETS VTKImageToITKImage
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Bridge/VtkGlue
COMPONENT Runtime
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ project(VisualizeEvolvingDense2DLevelSetAsElevationMap)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

add_executable(VisualizeEvolvingDense2DLevelSetAsElevationMap Code.cxx)
target_link_libraries(VisualizeEvolvingDense2DLevelSetAsElevationMap ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS VisualizeEvolvingDense2DLevelSetAsElevationMap
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Bridge/VtkGlue
COMPONENT Runtime
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ project(VisualizeEvolvingDense2DLevelSetZeroSet)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

add_executable(VisualizeEvolvingDense2DLevelSetZeroSet Code.cxx)
target_link_libraries(VisualizeEvolvingDense2DLevelSetZeroSet ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS VisualizeEvolvingDense2DLevelSetZeroSet
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Bridge/VtkGlue
COMPONENT Runtime
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
endif()

add_executable(VisualizeStaticDense2DLevelSetAsElevationMap Code.cxx)
target_link_libraries(VisualizeStaticDense2DLevelSetAsElevationMap ${ITK_LIBRARIES} ${VTK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES} ${VTK_LIBRARIES})

if(NOT VTK_VERSION VERSION_LESS "8.90.0")
vtk_module_autoinit(
Expand All @@ -30,7 +30,7 @@ if(NOT VTK_VERSION VERSION_LESS "8.90.0")
)
endif()

install(TARGETS VisualizeStaticDense2DLevelSetAsElevationMap
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Bridge/VtkGlue
COMPONENT Runtime
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
endif()

add_executable(VisualizeStaticDense2DLevelSetZeroSet Code.cxx)
target_link_libraries(VisualizeStaticDense2DLevelSetZeroSet ${ITK_LIBRARIES} ${VTK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES} ${VTK_LIBRARIES})

if(NOT VTK_VERSION VERSION_LESS "8.90.0")
vtk_module_autoinit(
Expand All @@ -29,7 +29,7 @@ if(NOT VTK_VERSION VERSION_LESS "8.90.0")
)
endif()

install(TARGETS VisualizeStaticDense2DLevelSetZeroSet
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Bridge/VtkGlue
COMPONENT Runtime
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
endif()

add_executable(VisualizeStaticMalcolm2DLevelSetLayers Code.cxx)
target_link_libraries(VisualizeStaticMalcolm2DLevelSetLayers ${ITK_LIBRARIES} ${VTK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES} ${VTK_LIBRARIES})

if(NOT VTK_VERSION VERSION_LESS "8.90.0")
vtk_module_autoinit(
Expand All @@ -29,7 +29,7 @@ if(NOT VTK_VERSION VERSION_LESS "8.90.0")
)
endif()

install(TARGETS VisualizeStaticMalcolm2DLevelSetLayers
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Bridge/VtkGlue
COMPONENT Runtime
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
endif()

add_executable(VisualizeStaticShi2DLevelSetLayers Code.cxx)
target_link_libraries(VisualizeStaticShi2DLevelSetLayers ${ITK_LIBRARIES} ${VTK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES} ${VTK_LIBRARIES})

if(NOT VTK_VERSION VERSION_LESS "8.90.0")
vtk_module_autoinit(
Expand All @@ -29,7 +29,7 @@ if(NOT VTK_VERSION VERSION_LESS "8.90.0")
)
endif()

install(TARGETS VisualizeStaticShi2DLevelSetLayers
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Bridge/VtkGlue
COMPONENT Runtime
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
endif()

add_executable(VisualizeStaticWhitaker2DLevelSetLayers Code.cxx)
target_link_libraries(VisualizeStaticWhitaker2DLevelSetLayers ${ITK_LIBRARIES} ${VTK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES} ${VTK_LIBRARIES})

if(NOT VTK_VERSION VERSION_LESS "8.90.0")
vtk_module_autoinit(
Expand All @@ -29,7 +29,7 @@ if(NOT VTK_VERSION VERSION_LESS "8.90.0")
)
endif()

install(TARGETS VisualizeStaticWhitaker2DLevelSetLayers
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Bridge/VtkGlue
COMPONENT Runtime
)
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Common/AddNoiseToBinaryImage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ find_package(ITK REQUIRED)
include(${ITK_USE_FILE})


add_executable(AddNoiseToBinaryImage Code.cxx)
target_link_libraries(AddNoiseToBinaryImage ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS AddNoiseToBinaryImage
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Core/Common
COMPONENT Runtime
)
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Common/AddOffsetToIndex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ project(AddOffsetToIndex)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

add_executable(AddOffsetToIndex Code.cxx Code.py)
target_link_libraries(AddOffsetToIndex ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx Code.py)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS AddOffsetToIndex
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Core/Common
COMPONENT Runtime
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ project(ApplyAFilterOnlyToASpecifiedRegionOfAnImage)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

add_executable(ApplyAFilterOnlyToASpecifiedRegionOfAnImage Code.cxx Code.py)
target_link_libraries(ApplyAFilterOnlyToASpecifiedRegionOfAnImage ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx Code.py)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS ApplyAFilterOnlyToASpecifiedRegionOfAnImage
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Core/Common
COMPONENT Runtime
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ find_package(ITK REQUIRED)
include(${ITK_USE_FILE})


add_executable(CustomOperationToEachPixelInImage Code.cxx)
target_link_libraries(CustomOperationToEachPixelInImage ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS CustomOperationToEachPixelInImage
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Core/Common
COMPONENT Runtime
)
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Common/BoundingBoxOfAPointSet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ project(BoundingBoxOfAPointSet)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

add_executable(BoundingBoxOfAPointSet Code.cxx Code.py)
target_link_libraries(BoundingBoxOfAPointSet ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx Code.py)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS BoundingBoxOfAPointSet
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Core/Common
COMPONENT Runtime
)
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Common/BresenhamLine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ find_package(ITK REQUIRED)
include(${ITK_USE_FILE})


add_executable(BresenhamLine Code.cxx)
target_link_libraries(BresenhamLine ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS BresenhamLine
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Core/Common
COMPONENT Runtime
)
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Common/BuildAHelloWorldProgram/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ project(BuildAHelloWorldProgram)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

add_executable(BuildAHelloWorldProgram Code.cxx Code.py)
target_link_libraries(BuildAHelloWorldProgram ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx Code.py)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS BuildAHelloWorldProgram
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Core/Common
COMPONENT Runtime
)
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Common/CastVectorImageToAnotherType/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ find_package(ITK REQUIRED)
include(${ITK_USE_FILE})


add_executable(CastVectorImageToAnotherType Code.cxx)
target_link_libraries(CastVectorImageToAnotherType ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS CastVectorImageToAnotherType
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Core/Common
COMPONENT Runtime
)
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Common/CheckIfModuleIsPresent/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ find_package(ITK REQUIRED)
include(${ITK_USE_FILE})


add_executable(CheckIfModuleIsPresent Code.cxx)
target_link_libraries(CheckIfModuleIsPresent ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS CheckIfModuleIsPresent
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Core/Common
COMPONENT Runtime
)
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Common/ComputeTimeBetweenPoints/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ project(ComputeTimeBetweenPoints)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

add_executable(ComputeTimeBetweenPoints Code.cxx)
target_link_libraries(ComputeTimeBetweenPoints ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS ComputeTimeBetweenPoints
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Core/Common
COMPONENT Runtime
)
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Common/ConceptCheckingIsFloatingPoint/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ project(ConceptCheckingIsFloatingPoint)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

add_executable(ConceptCheckingIsFloatingPoint Code.cxx)
target_link_libraries(ConceptCheckingIsFloatingPoint ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS ConceptCheckingIsFloatingPoint
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Core/Common
COMPONENT Runtime
)
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Common/ConceptCheckingIsSameDimension/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ project(ConceptCheckingIsSameDimension)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

add_executable(ConceptCheckingIsSameDimension Code.cxx)
target_link_libraries(ConceptCheckingIsSameDimension ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS ConceptCheckingIsSameDimension
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Core/Common
COMPONENT Runtime
)
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Common/ConceptCheckingIsSameType/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ project(ConceptCheckingIsSameType)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

add_executable(ConceptCheckingIsSameType Code.cxx)
target_link_libraries(ConceptCheckingIsSameType ${ITK_LIBRARIES})
add_executable(${PROJECT_NAME} Code.cxx)
target_link_libraries(${PROJECT_NAME} ${ITK_LIBRARIES})

install(TARGETS ConceptCheckingIsSameType
install(TARGETS ${PROJECT_NAME}
DESTINATION bin/ITKSphinxExamples/Core/Common
COMPONENT Runtime
)
Expand Down
Loading

0 comments on commit 8138ab7

Please sign in to comment.