From 7b9e37c7da6730601edbf32f0ae6dae2a17ca03c Mon Sep 17 00:00:00 2001 From: Anthony Alayo Date: Fri, 9 Feb 2024 12:08:24 -0800 Subject: [PATCH] build: add alias for libuv to CMakeLists.txt (#4297) Fixes: https://github.com/libuv/libuv/issues/4282 --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e8e0166d74..62609708636 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -787,6 +787,14 @@ if(MSVC) endif() endif() +if(BUILD_SHARED_LIBS) + set(LIB_SELECTED uv) +else() + set(LIB_SELECTED uv_a) +endif() + +add_library(libuv::libuv ALIAS ${LIB_SELECTED}) + message(STATUS "summary of build options: Install prefix: ${CMAKE_INSTALL_PREFIX} Target system: ${CMAKE_SYSTEM_NAME}