nghttp3 provides CMake targets: find_package(nghttp3 CONFIG REQUIRED) target_link_libraries(main PRIVATE $,nghttp3::nghttp3,nghttp3::nghttp3_static>)