From c7172ffe6157e3ffe5993b8e6839277e7a93ab7c Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Sun, 3 Nov 2024 23:54:47 +0000 Subject: [PATCH] #20 Fix cells cmake --- examples/cells/CMakeLists.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/cells/CMakeLists.txt b/examples/cells/CMakeLists.txt index 4e6a0d1..2275d27 100644 --- a/examples/cells/CMakeLists.txt +++ b/examples/cells/CMakeLists.txt @@ -11,12 +11,11 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter Development) # Find VTK find_package(VTK COMPONENTS CommonCore QUIET) - if(VTK_FOUND) - find_package(VTK REQUIRED COMPONENTS CommonCore RenderingCore RenderingOpenGL2 WrappingPythonCore) - else() - find_package(VTK REQUIRED COMPONENTS vtkCommonCore vtkRenderingCore vtkRenderingOpenGL2 vtkWrappingPythonCore) - endif() -endforeach() +if(VTK_FOUND) + find_package(VTK REQUIRED COMPONENTS CommonCore RenderingCore RenderingOpenGL2 WrappingPythonCore) +else() + find_package(VTK REQUIRED COMPONENTS vtkCommonCore vtkRenderingCore vtkRenderingOpenGL2 vtkWrappingPythonCore) +endif() # Find PETSc find_package(PETSc REQUIRED)