--- src/CMakeLists.txt.orig	2026-08-15 22:52:23 UTC
+++ src/CMakeLists.txt
@@ -36,17 +36,9 @@ set(LIBUV_BUILD_SHARED OFF CACHE BOOL "Build shared li
 set(LIBUV_BUILD_TESTS OFF CACHE BOOL "Build libuv tests" FORCE)
 set(LIBUV_BUILD_BENCH OFF CACHE BOOL "Build libuv benchmarks" FORCE)
 set(LIBUV_BUILD_SHARED OFF CACHE BOOL "Build shared libuv library" FORCE)
-add_subdirectory(${root}/deps/libuv ${CMAKE_CURRENT_BINARY_DIR}/libuv)
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(LIBUV REQUIRED IMPORTED_TARGET libuv)
 
-# libuv has const-correctness issues that trigger warnings-as-errors on newer compilers.
-# Turn off flags set in the top-level CMakeLists.txt.
-if(HAS_WNO_ERROR_DISCARDED_QUALIFIERS)
-    target_compile_options(uv_a PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wno-error=discarded-qualifiers>)
-endif()
-if(HAS_WNO_ERROR_INCOMPATIBLE_POINTER_TYPES_DISCARDS_QUALIFIERS)
-    target_compile_options(uv_a PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wno-error=incompatible-pointer-types-discards-qualifiers>)
-endif()
-
 option(VECSIM_BUILD_TESTS "Build vecsim tests" OFF)
 add_subdirectory(${root}/deps/VectorSimilarity ${CMAKE_CURRENT_BINARY_DIR}/VectorSimilarity)
 
@@ -151,7 +143,7 @@ target_link_libraries(redisearch_c
     redisearch-hash
     VectorSimilarity
     redisearch-coord
-    uv_a
+    PkgConfig::LIBUV
     ${HIREDIS_LIBS})
 
 add_dependencies(redisearch_c VectorSimilarity)
