cleanup of CMakeLists.txt

This commit is contained in:
Andreas Fabri 2024-10-10 14:26:33 +01:00
parent cc6c1dce1b
commit f85cc98d09
1 changed files with 3 additions and 13 deletions

View File

@ -12,19 +12,9 @@ include(CGAL_Eigen3_support)
find_package(TBB QUIET)
include(CGAL_TBB_support)
find_package(VTK QUIET COMPONENTS vtkImagingGeneral vtkIOImage vtkIOXML vtkIOXML vtkIOMINC vtkIOLegacy NO_MODULE)
find_package(VTK QUIET COMPONENTS vtkImagingGeneral vtkIOImage vtkIOXML vtkIOMINC vtkIOLegacy NO_MODULE)
if(VTK_FOUND)
if(VTK_USE_FILE)
include(${VTK_USE_FILE})
endif()
if("${VTK_VERSION_MAJOR}" GREATER "5" OR VTK_VERSION VERSION_GREATER 5)
message(STATUS "VTK was found")
if(TARGET VTK::ImagingGeneral AND TARGET VTK::IOImage AND TARGET VTK::IOXML AND VTK::IOMINC AND TARGET VTK::IOLegacy)
set(VTK_LIBRARIES VTK::ImagingGeneral VTK::IOImage VTK::IOXML VTK::IOLegacy)
endif()
else()
message(STATUS "NOTICE: VTK version 6.0 or greater is required")
endif()
message(STATUS "VTK was found")
else()
message(STATUS "NOTICE: VTK was not found")
endif()
@ -68,7 +58,7 @@ endif()
if(TARGET CGAL::CGAL_ImageIO)
if(TARGET CGAL::Eigen3_support)
if(VTK_FOUND AND ("${VTK_VERSION_MAJOR}" GREATER "5" OR VTK_VERSION VERSION_GREATER 5))
if(VTK_FOUND)
create_single_source_cgal_program("contouring_vtk_image.cpp")
target_link_libraries(contouring_vtk_image PRIVATE CGAL::Eigen3_support
CGAL::CGAL_ImageIO