Index: adios2/examples/basics/globalArrayND/CMakeLists.txt
===================================================================
--- adios2.orig/examples/basics/globalArrayND/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/basics/globalArrayND/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/basics/joinedArray/CMakeLists.txt
===================================================================
--- adios2.orig/examples/basics/joinedArray/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/basics/joinedArray/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/basics/localArray/CMakeLists.txt
===================================================================
--- adios2.orig/examples/basics/localArray/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/basics/localArray/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/basics/queryWorker/CMakeLists.txt
===================================================================
--- adios2.orig/examples/basics/queryWorker/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/basics/queryWorker/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/basics/values/CMakeLists.txt
===================================================================
--- adios2.orig/examples/basics/values/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/basics/values/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -18,7 +18,9 @@
     list(APPEND _components Fortran)
   endif()
 
-  find_package(MPI COMPONENTS ${_components})
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS ${_components})
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/basics/variablesShapes/CMakeLists.txt
===================================================================
--- adios2.orig/examples/basics/variablesShapes/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/basics/variablesShapes/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/bpWriter/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/bpWriter/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/bpWriter/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -18,7 +18,9 @@
     list(APPEND _components Fortran)
   endif()
 
-  find_package(MPI COMPONENTS ${_components})
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS ${_components})
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/useCases/insituGlobalArrays/CMakeLists.txt
===================================================================
--- adios2.orig/examples/useCases/insituGlobalArrays/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/useCases/insituGlobalArrays/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/bpAttributeWriteRead/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/bpAttributeWriteRead/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/bpAttributeWriteRead/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/bpFWriteCRead/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/bpFWriteCRead/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/bpFWriteCRead/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -18,7 +18,9 @@
     list(APPEND _components Fortran)
   endif()
 
-  find_package(MPI COMPONENTS ${_components})
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS ${_components})
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/bpFlushWriter/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/bpFlushWriter/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/bpFlushWriter/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/bpOperatorSZWriter/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/bpOperatorSZWriter/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/bpOperatorSZWriter/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components C)
 
-  find_package(MPI COMPONENTS ${_components})
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS ${_components})
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/bpReader/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/bpReader/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/bpReader/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -18,7 +18,9 @@
     list(APPEND _components Fortran)
   endif()
 
-  find_package(MPI COMPONENTS ${_components})
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS ${_components})
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/bpStepsWriteRead/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/bpStepsWriteRead/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/bpStepsWriteRead/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/bpStepsWriteReadKokkos/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/bpStepsWriteReadKokkos/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/bpStepsWriteReadKokkos/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -27,7 +27,9 @@
     list(APPEND _components Fortran)
   endif()
 
-  find_package(MPI QUIET COMPONENTS ${_components})
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI QUIET COMPONENTS ${_components})
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/datamanKokkos/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/datamanKokkos/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/datamanKokkos/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/datamanReader/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/datamanReader/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/datamanReader/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/datamanWriter/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/datamanWriter/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/datamanWriter/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/dataspacesReader/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/dataspacesReader/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/dataspacesReader/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/dataspacesWriter/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/dataspacesWriter/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/dataspacesWriter/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/hdf5Reader/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/hdf5Reader/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/hdf5Reader/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/hdf5SubFile/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/hdf5SubFile/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/hdf5SubFile/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/hdf5Writer/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/hdf5Writer/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/hdf5Writer/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/helloWorld/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/helloWorld/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/helloWorld/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components C CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/inlineReaderWriter/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/inlineReaderWriter/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/inlineReaderWriter/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/skeleton/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/skeleton/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/skeleton/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/sstReader/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/sstReader/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/sstReader/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/hello/sstWriter/CMakeLists.txt
===================================================================
--- adios2.orig/examples/hello/sstWriter/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/hello/sstWriter/CMakeLists.txt	2024-09-10 15:23:55.197441545 +0200
@@ -9,7 +9,9 @@
 if(NOT TARGET adios2_core)
   set(_components CXX)
 
-  find_package(MPI COMPONENTS C)
+  if(ADIOS2_HAVE_MPI)
+    find_package(MPI COMPONENTS C)
+  endif()
   if(MPI_FOUND)
     # Workaround for various MPI implementations forcing the link of C++ bindings
     add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX)
Index: adios2/examples/plugins/CMakeLists.txt
===================================================================
--- adios2.orig/examples/plugins/CMakeLists.txt	2024-09-10 15:23:55.201441587 +0200
+++ adios2/examples/plugins/CMakeLists.txt	2024-09-10 15:24:35.533860709 +0200
@@ -3,7 +3,9 @@
 # accompanying file Copyright.txt for details.
 #------------------------------------------------------------------------------#
 
-add_subdirectory(engine)
+if(ADIOS2_add_examples_plugins_engine)
+  add_subdirectory(engine)
+endif()
 if(ADIOS2_HAVE_Sodium)
   add_subdirectory(operator)
 endif()
