2022-07-09 04:02:45 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
|
index fdfe456..ef2d329 100644
|
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
|
|
|
@@ -647,16 +647,16 @@ macro (CMAKE_BUILD_UTILITIES)
|
|
|
|
#---------------------------------------------------------------------
|
|
|
|
# Build libuv library.
|
|
|
|
if(CMAKE_USE_SYSTEM_LIBUV)
|
|
|
|
- if(WIN32)
|
|
|
|
- find_package(LibUV 1.38.0)
|
|
|
|
- else()
|
|
|
|
- find_package(LibUV 1.10.0)
|
|
|
|
- endif()
|
|
|
|
- if(NOT LIBUV_FOUND)
|
|
|
|
+ find_package(libuv CONFIG REQUIRED)
|
|
|
|
+ if(0)
|
|
|
|
message(FATAL_ERROR
|
|
|
|
"CMAKE_USE_SYSTEM_LIBUV is ON but a libuv is not found!")
|
|
|
|
endif()
|
|
|
|
- set(CMAKE_LIBUV_LIBRARIES LibUV::LibUV)
|
2023-06-28 08:07:58 +08:00
|
|
|
+ if (TARGET libuv::uv)
|
|
|
|
+ set(CMAKE_LIBUV_LIBRARIES libuv::uv)
|
2022-07-09 04:02:45 +08:00
|
|
|
+ else()
|
2023-06-28 08:07:58 +08:00
|
|
|
+ set(CMAKE_LIBUV_LIBRARIES libuv::uv_a)
|
2022-07-09 04:02:45 +08:00
|
|
|
+ endif()
|
|
|
|
else()
|
|
|
|
set(CMAKE_LIBUV_LIBRARIES cmlibuv)
|
|
|
|
add_subdirectory(Utilities/cmlibuv)
|