Cannot link ADIOS2 through CMake

Created by: williamfgc

@chuckatkins I have a cmake project that is trying to link with ADIOS2 after a normal make install

This is a Fortran90 project for which I have in CMakeLists.txt:

find_package(ADIOS2 REQUIRED)
...
target_link_libraries(${programfile}.x adios2::adios2_Fortran ${BLAS_LIBRARIES} MPI::MPI_Fortran )

But I get the following error when running : cmake -DADIOS2_ROOT=/opt/adios2/ ..

CMake Error at CMakeLists.txt:22 (find_package):
  By not providing "FindADIOS2.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "ADIOS2", but
  CMake did not find one.

  Could not find a package configuration file provided by "ADIOS2" with any
  of the following names:

    ADIOS2Config.cmake
    adios2-config.cmake

  Add the installation prefix of "ADIOS2" to CMAKE_PREFIX_PATH or set
  "ADIOS2_DIR" to a directory containing one of the above files.  If "ADIOS2"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!

The ADIOS2Config.cmake file exists under adios2/lib/cmake