libuv provides CMake targets: find_package(libuv CONFIG REQUIRED) target_link_libraries(main PRIVATE $,libuv::uv_a,libuv::uv>)