build: add alias for libuv to CMakeLists.txt (#4297)

Fixes: https://github.com/libuv/libuv/issues/4282
This commit is contained in:
Anthony Alayo 2024-02-09 12:08:24 -08:00 committed by GitHub
parent 009d7414bc
commit 7b9e37c7da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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}