The package adios2 provides CMake targets: find_package(adios2 CONFIG REQUIRED) target_link_libraries(main PRIVATE adios2::adios2)