diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8f484b0393a938d9995e19666903f3fc8f20b254..2e0b299005e12999c0dcdcffe495f2eb69bf3662 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -178,14 +178,16 @@ if (PUGS_ENABLE_PETSC MATCHES "^(AUTO|ON)$")
     # PETSc support is deactivated if MPI is not found
     pkg_check_modules(PETSC IMPORTED_TARGET GLOBAL PETSc)
 
-    set_property(TARGET PkgConfig::PETSC PROPERTY
-      IMPORTED_LOCATION "${PETSC_LIBRARIES}"
-    )
-    set_property(TARGET PkgConfig::PETSC PROPERTY
-      INTERFACE_INCLUDE_DIRECTORIES "${PETSC_INCLUDE_DIRS}"
-    )
+    if (${PETSC_FOUND})
+      set_property(TARGET PkgConfig::PETSC PROPERTY
+	IMPORTED_LOCATION "${PETSC_LIBRARIES}"
+      )
+      set_property(TARGET PkgConfig::PETSC PROPERTY
+	INTERFACE_INCLUDE_DIRECTORIES "${PETSC_INCLUDE_DIRS}"
+      )
 
-    set(PETSC_TARGET PkgConfig::PETSC)
+      set(PETSC_TARGET PkgConfig::PETSC)
+    endif()
   else()
     message(STATUS "PETSc support is deactivated since pugs will not be build with MPI support")
     set(PETSC_FOUND FALSE)
@@ -215,14 +217,16 @@ if (PUGS_ENABLE_SLEPC MATCHES "^(AUTO|ON)$")
     # SLEPc support is deactivated if PETSc is not found
     pkg_check_modules(SLEPC IMPORTED_TARGET GLOBAL SLEPc)
 
-    set_property(TARGET PkgConfig::SLEPC PROPERTY
-      IMPORTED_LOCATION "${SLEPC_LIBRARIES}"
-    )
-    set_property(TARGET PkgConfig::SLEPC PROPERTY
-      INTERFACE_INCLUDE_DIRECTORIES "${SLEPC_INCLUDE_DIRS}"
-    )
+    if (${SLEPC_FOUND})
+      set_property(TARGET PkgConfig::SLEPC PROPERTY
+	IMPORTED_LOCATION "${SLEPC_LIBRARIES}"
+      )
+      set_property(TARGET PkgConfig::SLEPC PROPERTY
+	INTERFACE_INCLUDE_DIRECTORIES "${SLEPC_INCLUDE_DIRS}"
+      )
 
-    set(SLEPC_TARGET PkgConfig::SLEPC)
+      set(SLEPC_TARGET PkgConfig::SLEPC)
+    endif()
   else()
     message(STATUS "SLEPc support is deactivated since pugs will not be build with PETSc support")
     set(SLEPC_FOUND FALSE)
@@ -289,7 +293,7 @@ if (PUGS_ENABLE_HDF5 MATCHES "^(AUTO|ON)$")
   set(PUGS_HAS_HDF5 ${HDF5_FOUND})
 else()
   unset(HIGHFIVE_TARGET)
-  unset(HDF5_TARGET PkgConfig::HDF5)
+  unset(HDF5_TARGET)
   unset(PUGS_HAS_HDF5)
 endif()
 
diff --git a/tools/plugin-template/README.md-template b/tools/plugin-template/README.md-template
index 4db1071714e56642f3114dad4bc3451bbb274b56..48485137f1b8c9f8063fec872aa38e15916d9350 100644
--- a/tools/plugin-template/README.md-template
+++ b/tools/plugin-template/README.md-template
@@ -11,9 +11,9 @@ Building this plugin requires an **installed** version of `pugs`.
 Before building `pugs` one should define its installation directory.
 In the `pugs` compilation directory one should execute
 ```shell
-cmake -DCMAKE_INSTALL_PREFIX=pugs_install_dir ...
+cmake -DCMAKE_INSTALL_PREFIX=[pugs_install_dir] [pugs_src_path] [...]
 ```
-where `pugs_install_dir` is the chosen installation directory.
+where `[pugs_install_dir]` is the chosen installation directory.
 
 Then one simply runs
 ```shell
@@ -30,12 +30,12 @@ make install
 > is not able to remove them, to avoid the risk of compilation issues,
 > one has to dot it manually...
 
-In the build directory one runs
+In the plugin build directory one runs
 ```shell
-cmake -DPUGS_PREFIX_PATH=pugs_install_dir _PLUGIN_LOW__dir
+cmake -DPUGS_PREFIX_PATH=[pugs_install_dir] [_PLUGIN_LOW__src_dir]
 ```
-where `pugs_install_dir` has the same value as above and `_PLUGIN_LOW__dir`
-is the directory that contains this `README.md` file.
+where `[pugs_install_dir]` has the same value as above and `[_PLUGIN_LOW__src_dir]`
+is the plugin source directory that contains this `README.md` file.
 
 Then to build the plugin, one runs
 ```shell
@@ -65,3 +65,6 @@ export PUGS_PLUGIN_DIR="/pathtoplugin1;/pathtoplugin2"
 ```
 
 Then one launches `pugs` classically.
+```shell
+[pugs_install_dir]/bin/pugs [script.pgs]
+```