From f85cc98d09091fa7d6fe791a17309f6eebfcc001 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Oct 2024 14:26:33 +0100 Subject: [PATCH] cleanup of CMakeLists.txt --- .../examples/Isosurfacing_3/CMakeLists.txt | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/Isosurfacing_3/examples/Isosurfacing_3/CMakeLists.txt b/Isosurfacing_3/examples/Isosurfacing_3/CMakeLists.txt index 4f360965804..f5a673fb2c9 100644 --- a/Isosurfacing_3/examples/Isosurfacing_3/CMakeLists.txt +++ b/Isosurfacing_3/examples/Isosurfacing_3/CMakeLists.txt @@ -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