Task: CMake: improve HDF5 support (AMReX-Codes/amrex#1468)

org: AMReX-Codes
repo: amrex
pr_number: 1468
issue_title: CMake: improve HDF5 support
issue_body: ## Summary

Fix #1463

## Additional background

## Checklist

The proposed changes:
- [ ] fix a bug or incorrect behavior in AMReX
- [ ] add new capabilities to AMReX
- [ ] changes answers in the test suite to more than roundoff level
- [ ] are likely to significantly affect the results of downstream AMReX users
- [ ] are described in the proposed changes to the AMReX documentation, if appropriate

resolved_issues: number: 1463
title: Build Question - Lib folders
body: Hello there, I'm trying to build AMReX with the following libraries and versions:
```
1) gcc/9.1.1
4) cmake/3.16.7
2) mpich/3.3.1
3) petsc/3.11.3
5) hdf5/1.10.5
```
I'm on tag `20.10`, created a `build` folder and using the following options with cmake:
```
-DCMAKE_INSTALL_PREFIX=/opt/apps/amrex/20.10-mpich-3.3.1-petsc-3.11.3-hdf5-1.10.5
-DDIM=3 
-DENABLE_FORTRAN=yes 
-DENABLE_FORTRAN_INTERFACES=yes 
-DENABLE_MPI=yes 
-DENABLE_HYPRE=yes 
-DENABLE_HDF5=yes 
-DENABLE_PETSC=yes
```

How can I set the paths for those libraries I want to use? I coudn't find in the docs flags to set the path of the libraries ...
None of my libs are instaled in the system path, allways in `/opt/apps`.


Reference solution:
fix_patch: diff --git a/Tools/CMake/AMReXThirdPartyLibraries.cmake b/Tools/CMake/AMReXThirdPartyLibraries.cmake
index 52ad1ff27ce..82193da3c2f 100644
--- a/Tools/CMake/AMReXThirdPartyLibraries.cmake
+++ b/Tools/CMake/AMReXThirdPartyLibraries.cmake
@@ -3,13 +3,19 @@
 #
 if (ENABLE_HDF5)
     set(HDF5_PREFER_PARALLEL TRUE)
-    find_package(HDF5 1.10.4 REQUIRED COMPONENTS CXX)
+    find_package(HDF5 1.10.4 REQUIRED)
     if (NOT HDF5_IS_PARALLEL)
         message(FATAL_ERROR "\nHDF5 library does not support parallel I/O")
+     endif ()
+
+    if (TARGET hdf5::hdf5)  # CMake >= 3.19
+       target_link_libraries(amrex PUBLIC hdf5::hdf5)
+    else ()  # CMake < 3.19 -- Remove when minimum cmake version is bumped up
+       target_include_directories(amrex PUBLIC ${HDF5_INCLUDE_DIRS})
+       target_compile_definitions(amrex PUBLIC ${HDF5_DEFINITIONS})
+       target_link_libraries(amrex PUBLIC ${HDF5_LIBRARIES})
     endif ()
-    target_include_directories(amrex PUBLIC ${HDF5_CXX_INCLUDE_DIRS})
-    target_compile_definitions(amrex PUBLIC ${HDF5_CXX_DEFINES})
-    target_link_libraries(amrex PUBLIC ${HDF5_CXX_LIBRARIES})
+
 endif ()