mirror of https://github.com/CGAL/cgal
add and use CGAL_ITK_support.cmake
This commit is contained in:
parent
b664ee54c3
commit
0498cace68
|
|
@ -0,0 +1,7 @@
|
|||
if(ITK_FOUND AND NOT TARGET CGAL::ITK_support)
|
||||
add_library(CGAL::ITK_support INTERFACE IMPORTED)
|
||||
set_target_properties(CGAL::ITK_support PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS "CGAL_USE_ITK"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${ITK_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${ITK_LIBRARIES}")
|
||||
endif()
|
||||
|
|
@ -164,10 +164,10 @@ if(TARGET CGAL::CGAL_ImageIO)
|
|||
|
||||
find_package(ITK QUIET COMPONENTS ITKCommon ITKThresholding ITKSmoothing ITKImageIntensity)
|
||||
if(ITK_FOUND)
|
||||
include(${ITK_USE_FILE})
|
||||
include(CGAL_ITK_support)
|
||||
create_single_source_cgal_program("mesh_3D_weighted_image.cpp")
|
||||
target_link_libraries(mesh_3D_weighted_image
|
||||
PUBLIC CGAL::Eigen3_support ${ITK_LIBRARIES})
|
||||
PUBLIC CGAL::Eigen3_support CGAL::ITK_support)
|
||||
endif(ITK_FOUND)
|
||||
|
||||
else()
|
||||
|
|
|
|||
|
|
@ -30,9 +30,8 @@ target_include_directories(mesh_3_plugin PRIVATE include)
|
|||
|
||||
find_package(ITK QUIET COMPONENTS ITKCommon ITKThresholding ITKSmoothing ITKImageIntensity)
|
||||
if(ITK_FOUND)
|
||||
include(${ITK_USE_FILE})
|
||||
target_link_libraries(mesh_3_plugin PUBLIC ${ITK_LIBRARIES})
|
||||
target_compile_definitions(mesh_3_plugin PUBLIC CGAL_USE_ITK)
|
||||
include(CGAL_ITK_support)
|
||||
target_link_libraries(mesh_3_plugin PUBLIC CGAL::ITK_support)
|
||||
endif(ITK_FOUND)
|
||||
|
||||
find_package(VTK QUIET COMPONENTS vtkImagingGeneral vtkIOImage NO_MODULE)
|
||||
|
|
|
|||
Loading…
Reference in New Issue