adios2 C bindings not working with CMake adios2::adios2 target

Created by: williamfgc

I am trying to link adios2 to a project using the C bindings using cmake:

ADIOS2 is found by cmake, but: target_link_libraries(HPIC PRIVATE adios2::adios2)

fails when linking after make:

In file included from /Users/wfg/workspace/hPIC/examples/plasma/two_stream_instability_adios2.c:24:
/Users/wfg/workspace/hPIC/includes/hpic_defs.h:11:10: fatal error: 'adios2_c.h' file not
      found
#include <adios2_c.h>
         ^~~~~~~~~~~~

I tried target_link_libraries(HPIC PRIVATE adios2::adios2_c) but I get at the configuration stage:

CMake Error at tests/CMakeLists.txt:15 (add_executable):
  Target "hpic_field_buffer_integrity_test" links to target
  "adios2::adios2_c" but the target was not found.  Perhaps a find_package()
  call is missing for an IMPORTED target, or an ALIAS target is missing?