[uvw] Update to 3.0.0 (#31317)

* [uvw] Update to 3.0.0

* update version
This commit is contained in:
Lily Wang 2023-05-10 07:04:38 +08:00 committed by GitHub
parent ff311f676b
commit 602815cba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 44 additions and 46 deletions

View File

@ -1,29 +0,0 @@
cmake_minimum_required(VERSION 3.8)
project(uvw)
find_package(libuv CONFIG REQUIRED)
add_library(uvw INTERFACE)
if (TARGET uv)
target_link_libraries(uvw INTERFACE uv)
else()
target_link_libraries(uvw INTERFACE uv_a)
endif()
install(TARGETS uvw
EXPORT uvw
INCLUDES DESTINATION include/)
install(EXPORT uvw
DESTINATION "share/uvw"
FILE uvw-targets.cmake
NAMESPACE uvw::)
install(DIRECTORY
src/uvw/
DESTINATION include/uvw/)
install(FILES
src/uvw.hpp
DESTINATION include/
)

View File

@ -0,0 +1,19 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 289c006..180383f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -193,6 +193,14 @@ if (BUILD_UVW_LIBS)
SOVERSION ${UVW_VERSION_MAJOR}
)
endif()
+
+find_package(libuv CONFIG REQUIRED)
+if (TARGET uv)
+ target_link_libraries(uvw PRIVATE uv)
+else()
+ target_link_libraries(uvw PRIVATE uv_a)
+endif()
+
install(
EXPORT uvwConfig
NAMESPACE uvw::

View File

@ -1,22 +1,28 @@
#header-only library
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO skypjack/uvw
REF 3db9e8f75a4351325e1ea00e17586af2b00cf1ea # v2.12.1_libuv_v1.44
SHA512 35e799fe877abc26ae44d20c9b5b292497d1468d9f89c0fc19b96a0b0712e35084480100e2fe7324353e2c3805c2f018e89192357d974bfd009af9b58bfcb7ec
REF "v${VERSION}_libuv_v1.44"
SHA512 6794d71f88888e58d53fbea18eecb8e43a01f9965012a4b0f3c29bd5dd1280aac8dfe735d3df7f401d309e182fa7ed4e2e0b4aff49beaa1973dcd61153bbb1af
PATCHES
fix-find-libuv.patch
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_UVW_LIBS=${BUILD_STATIC}
-DFETCH_LIBUV=OFF
-DFIND_LIBUV=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/uvw-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/uvw/")
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/uvw)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# Handle copyright/readme/package files
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(INSTALL "${SOURCE_PATH}/README.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
# Handle copyright
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

View File

@ -1,2 +0,0 @@
find_package(libuv CONFIG REQUIRED)
include ("${CMAKE_CURRENT_LIST_DIR}/uvw-targets.cmake")

View File

@ -1,8 +1,7 @@
{
"name": "uvw",
"version": "2.12.1",
"port-version": 2,
"description": "Header-only, event based, tiny and easy to use libuv wrapper in modern C++.",
"version": "3.0.0",
"description": "A compilable static library, event based, tiny and easy to use libuv wrapper in modern C++.",
"homepage": "https://github.com/skypjack/uvw",
"license": "MIT",
"dependencies": [

View File

@ -8241,8 +8241,8 @@
"port-version": 0
},
"uvw": {
"baseline": "2.12.1",
"port-version": 2
"baseline": "3.0.0",
"port-version": 0
},
"uwebsockets": {
"baseline": "20.40.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ffc751aa641f583e42aad836b6bd7766661f789a",
"version": "3.0.0",
"port-version": 0
},
{
"git-tree": "c36c66a8d5f4a6eed4aa9fe4399f32a516d3883c",
"version": "2.12.1",