[libuv] update to 1.44.1 and use official CMakeLists (#24745)

* [libuv] update to <1.44.1>

* update version

* fix ci error

* update version

* fix-ci-error

* [libuv] update to <1.44.1>

* update version

* add patch

* update version

* add option

* update version

* delete patch

* update evrsion

* fix ci error

* update version

* delete patch

* update evrsion

* Use official CMakeLists.txt

* Fix build type

* Re-fix, fix pkgconfig

* Fix usocket build

* Fix uvw build

* Fix wpilib build

* Fix cmake build

* Fix tensorpipe build

* Fix qpid-proton build

* modern portfile

* update version

* Add licese

* update version

* Update ports/usockets/CMakeLists.txt

* update version

* Add usage

* Apply suggestion

* version

* Disable to build examples

* version

* typo

* version

* Fix find_package

* version

* Update version

Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
This commit is contained in:
JonLiu1993 2022-07-09 04:02:45 +08:00 committed by GitHub
parent 83990a6d9a
commit 72ef222e77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 322 additions and 241 deletions

View File

@ -1,83 +0,0 @@
cmake_minimum_required(VERSION 3.5)
project(libuv C)
find_package(Threads REQUIRED)
file(GLOB UV_SOURCES_COMMON src/*.c)
file(GLOB UV_SOURCES_UNIX
src/unix/async.c
src/unix/core.c
src/unix/dl.c
src/unix/fs.c
src/unix/getaddrinfo.c
src/unix/getnameinfo.c
src/unix/loop.c
src/unix/loop-watcher.c
src/unix/pipe.c
src/unix/poll.c
src/unix/process.c
src/unix/signal.c
src/unix/stream.c
src/unix/tcp.c
src/unix/thread.c
src/unix/tty.c
src/unix/udp.c
)
file(GLOB UV_SOURCES_LINUX
src/unix/proctitle.c
src/unix/linux-core.c
src/unix/linux-inotify.c
src/unix/linux-syscalls.c
src/unix/procfs-exepath.c
src/unix/sysinfo-loadavg.c
src/unix/sysinfo-memory.c
src/unix/epoll.c
)
file(GLOB UV_SOURCES_DARWIN
src/unix/proctitle.c
src/unix/darwin.c
src/unix/fsevents.c
src/unix/darwin-proctitle.c
src/unix/bsd-ifaddrs.c
src/unix/kqueue.c
)
file(GLOB UV_SOURCES_FREEBSD
src/unix/freebsd.c
src/unix/posix-hrtime.c
src/unix/bsd-proctitle.c
src/unix/bsd-ifaddrs.c
src/unix/kqueue.c
)
file(GLOB UV_SOURCES_WIN src/win/*.c)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_WIN})
target_compile_definitions(libuv PRIVATE WIN32_LEAN_AND_MEAN "_WIN32_WINNT=0x0600")
target_link_libraries(libuv PRIVATE iphlpapi psapi shell32 userenv ws2_32)
elseif(APPLE)
add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_DARWIN})
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_FREEBSD})
else() # Assume some Linux variant
add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_LINUX})
endif()
target_link_libraries(libuv PRIVATE Threads::Threads)
target_include_directories(libuv PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>)
set_target_properties(libuv PROPERTIES DEFINE_SYMBOL BUILDING_UV_SHARED)
if(NOT UV_SKIP_HEADERS)
install(
DIRECTORY include/
DESTINATION include
)
endif()
install(TARGETS libuv
EXPORT libuv
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)
install(EXPORT libuv FILE unofficial-libuv-targets.cmake NAMESPACE unofficial::libuv:: DESTINATION share/unofficial-libuv)

View File

@ -0,0 +1,72 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac52412..15d5cb2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -381,7 +381,7 @@ endif()
if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|Linux|NetBSD|OpenBSD")
list(APPEND uv_test_libraries util)
endif()
-
+if (BUILD_SHARED_LIBS)
add_library(uv SHARED ${uv_sources})
target_compile_definitions(uv
INTERFACE
@@ -401,7 +401,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OS390")
set_target_properties(uv PROPERTIES LINKER_LANGUAGE CXX)
endif()
target_link_libraries(uv ${uv_libraries})
-
+else()
add_library(uv_a STATIC ${uv_sources})
target_compile_definitions(uv_a PRIVATE ${uv_defines})
target_compile_options(uv_a PRIVATE ${uv_cflags})
@@ -416,7 +416,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OS390")
set_target_properties(uv_a PROPERTIES LINKER_LANGUAGE CXX)
endif()
target_link_libraries(uv_a ${uv_libraries})
-
+endif()
if(LIBUV_BUILD_TESTS)
# Small hack: use ${uv_test_sources} now to get the runner skeleton,
# before the actual tests are added.
@@ -659,26 +659,39 @@ string(REPLACE ";" " " LIBS "${LIBS}")
file(STRINGS configure.ac configure_ac REGEX ^AC_INIT)
string(REGEX MATCH "([0-9]+)[.][0-9]+[.][0-9]+" PACKAGE_VERSION "${configure_ac}")
set(UV_VERSION_MAJOR "${CMAKE_MATCH_1}")
+if (BUILD_SHARED_LIBS)
# The version in the filename is mirroring the behaviour of autotools.
set_target_properties(uv PROPERTIES
VERSION ${UV_VERSION_MAJOR}.0.0
SOVERSION ${UV_VERSION_MAJOR})
+endif()
set(includedir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
set(prefix ${CMAKE_INSTALL_PREFIX})
+if (BUILD_SHARED_LIBS)
configure_file(libuv.pc.in libuv.pc @ONLY)
+else()
configure_file(libuv-static.pc.in libuv-static.pc @ONLY)
+endif()
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
-install(FILES ${PROJECT_BINARY_DIR}/libuv.pc ${PROJECT_BINARY_DIR}/libuv-static.pc
+if (BUILD_SHARED_LIBS)
+install(FILES ${PROJECT_BINARY_DIR}/libuv.pc
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+else()
+install(FILES ${PROJECT_BINARY_DIR}/libuv-static.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+endif()
+if (BUILD_SHARED_LIBS)
install(TARGETS uv EXPORT libuvConfig
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+else()
install(TARGETS uv_a EXPORT libuvConfig
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+endif()
install(EXPORT libuvConfig DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libuv)
if(MSVC)

View File

@ -1,39 +1,35 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libuv/libuv
REF v1.43.0
SHA512 66ee11f8f6fc1313c432858572789cf67acd6364b29a06c73323ab20626e2d6e3d3dcea748cf5d9d4368b40ad7fe0d5fd35e9369c22e531db523703f005248d3
REF e8b7eb6908a847ffbe6ab2eec7428e43a0aa53a2 #v1.44.1
SHA512 c8918fe3cdfcfec7c7da4af8286b5fd28805f41a40a283a22ff578631835539d9f52b46310f1ac0a464a570f9664d6793bb6c63541f01a4f379b3ad2f7c56aea
HEAD_REF v1.x
PATCHES fix-build-type.patch
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS_DEBUG
-DUV_SKIP_HEADERS=ON
OPTIONS
-DLIBUV_BUILD_TESTS=OFF
-DQEMU=OFF
-DASAN=OFF
-DTSAN=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-libuv CONFIG_PATH share/unofficial-libuv)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libuv)
vcpkg_fixup_pkgconfig()
configure_file(
"${CMAKE_CURRENT_LIST_DIR}/unofficial-libuv-config.in.cmake"
"${CURRENT_PACKAGES_DIR}/share/unofficial-libuv/unofficial-libuv-config.cmake"
@ONLY
)
file(READ "${CURRENT_PACKAGES_DIR}/include/uv.h" UV_H)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
string(REPLACE "defined(USING_UV_SHARED)" "1" UV_H "${UV_H}")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/uv.h" "defined(USING_UV_SHARED)" "1")
else()
string(REPLACE "defined(USING_UV_SHARED)" "0" UV_H "${UV_H}")
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/uv.h" "defined(USING_UV_SHARED)" "0")
endif()
file(WRITE "${CURRENT_PACKAGES_DIR}/include/uv.h" "${UV_H}")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,7 +0,0 @@
if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
include(CMakeFindDependencyMacro)
find_dependency(Threads)
endif()
include(${CMAKE_CURRENT_LIST_DIR}/unofficial-libuv-targets.cmake)

4
ports/libuv/usage Normal file
View File

@ -0,0 +1,4 @@
libuv provides CMake targets:
find_package(libuv CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:uv_a>,uv_a,uv>)

View File

@ -1,16 +0,0 @@
_find_package(${ARGS})
if(WIN32)
list(APPEND LibUV_LIBRARIES iphlpapi psapi shell32 userenv ws2_32)
if(TARGET LibUV::LibUV)
set_property(TARGET LibUV::LibUV APPEND PROPERTY INTERFACE_LINK_LIBRARIES iphlpapi psapi shell32 userenv ws2_32)
endif()
endif()
include(CMakeFindDependencyMacro)
find_dependency(Threads)
list(APPEND LibUV_LIBRARIES Threads::Threads)
if(TARGET LibUV::LibUV)
set_property(TARGET LibUV::LibUV APPEND PROPERTY INTERFACE_LINK_LIBRARIES Threads::Threads)
endif()

View File

@ -1,8 +1,9 @@
{
"name": "libuv",
"version-semver": "1.43.0",
"version-semver": "1.44.1",
"description": "libuv is a multi-platform support library with a focus on asynchronous I/O.",
"homepage": "https://github.com/libuv/libuv",
"license": "BSD-3-Clause",
"dependencies": [
{
"name": "vcpkg-cmake",

View File

@ -1,8 +1,26 @@
diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt
index 27b40e7..1931b65 100644
index 27b40e7..a3a5d38 100644
--- a/c/CMakeLists.txt
+++ b/c/CMakeLists.txt
@@ -727,11 +727,6 @@ install (FILES
@@ -377,11 +377,15 @@ if (PROACTOR STREQUAL "iocp" OR (NOT PROACTOR AND NOT PROACTOR_OK))
endif()
if (PROACTOR STREQUAL "libuv" OR (NOT PROACTOR AND NOT PROACTOR_OK))
- find_package(Libuv)
+ find_package(Libuv NAMES libuv CONFIG)
if (Libuv_FOUND)
set (PROACTOR_OK libuv)
set (qpid-proton-proactor src/proactor/libuv.c ${qpid-proton-proactor-common})
- set (PROACTOR_LIBS Libuv::Libuv)
+ if (TARGET uv)
+ set (PROACTOR_LIBS uv)
+ else()
+ set (PROACTOR_LIBS uv_a)
+ endif()
endif()
endif()
@@ -727,11 +731,6 @@ install (FILES
${CMAKE_CURRENT_BINARY_DIR}/ProtonConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/ProtonConfigVersion.cmake
DESTINATION ${LIB_INSTALL_DIR}/cmake/Proton)
@ -14,8 +32,51 @@ index 27b40e7..1931b65 100644
if (ENABLE_BENCHMARKS)
add_subdirectory(benchmarks)
diff --git a/c/src/ProtonConfig.cmake.in b/c/src/ProtonConfig.cmake.in
index 6bcc3c0..2f03dc4 100644
--- a/c/src/ProtonConfig.cmake.in
+++ b/c/src/ProtonConfig.cmake.in
@@ -23,7 +23,8 @@
# URL: http://qpid.apache.org/proton/
@PACKAGE_INIT@
-if (NOT Proton_USE_STATIC_LIBS)
+include(CMakeFindDependencyMacro)
+if (1)
include("${CMAKE_CURRENT_LIST_DIR}/ProtonTargets.cmake")
else()
include("${CMAKE_CURRENT_LIST_DIR}/ProtonTargetsStatic.cmake")
@@ -32,24 +33,21 @@ endif()
set(Proton_VERSION @PN_VERSION@)
# find dependencies, because static libs don't transitively pull them
-if (Proton_USE_STATIC_LIBS)
- set(CMAKE_MODULE_PATH_OLD ${CMAKE_MODULE_PATH})
- set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
+if (1)
set(CyrusSASL_FOUND @CyrusSASL_FOUND@)
if (CyrusSASL_FOUND)
- find_package (CyrusSASL REQUIRED)
+ find_dependency (CyrusSASL)
endif()
set(OPENSSL_FOUND @OPENSSL_FOUND@)
set(OpenSSL_FOUND @OpenSSL_FOUND@)
if (OPENSSL_FOUND OR OpenSSL_FOUND)
- find_package (OpenSSL REQUIRED)
+ find_dependency (OpenSSL)
endif()
- find_package (Threads REQUIRED)
+ find_dependency (Threads)
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH_OLD})
endif()
set (Proton_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 03fe80a..fd6a31d 100644
index 03fe80a..89c14ed 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -26,12 +26,15 @@ find_package(Threads)
@ -38,64 +99,11 @@ index 03fe80a..fd6a31d 100644
else()
set(CONNECT_CONFIG_SRC src/connect_config_dummy.cpp)
endif()
--- a/c/src/ProtonConfig.cmake.in
+++ b/c/src/ProtonConfig.cmake.in
@@ -20,39 +20,40 @@
# Name: Proton
# Description: Qpid Proton C library
# Version: @PN_VERSION@
# URL: http://qpid.apache.org/proton/
@PACKAGE_INIT@
-if (NOT Proton_USE_STATIC_LIBS)
+include(CMakeFindDependencyMacro)
+if (1)
include("${CMAKE_CURRENT_LIST_DIR}/ProtonTargets.cmake")
else()
include("${CMAKE_CURRENT_LIST_DIR}/ProtonTargetsStatic.cmake")
endif()
set(Proton_VERSION @PN_VERSION@)
# find dependencies, because static libs don't transitively pull them
-if (Proton_USE_STATIC_LIBS)
- set(CMAKE_MODULE_PATH_OLD ${CMAKE_MODULE_PATH})
- set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
+if (1)
+ #set(CMAKE_MODULE_PATH_OLD ${CMAKE_MODULE_PATH})
+ #set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
set(CyrusSASL_FOUND @CyrusSASL_FOUND@)
if (CyrusSASL_FOUND)
- find_package (CyrusSASL REQUIRED)
+ find_dependency (CyrusSASL)
endif()
set(OPENSSL_FOUND @OPENSSL_FOUND@)
set(OpenSSL_FOUND @OpenSSL_FOUND@)
if (OPENSSL_FOUND OR OpenSSL_FOUND)
- find_package (OpenSSL REQUIRED)
+ find_dependency (OpenSSL)
endif()
- find_package (Threads REQUIRED)
+ find_dependency (Threads)
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH_OLD})
+ #set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH_OLD})
endif()
set (Proton_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
set (Proton_LIBRARIES Proton::qpid-proton)
set (Proton_FOUND True)
diff --git a/cpp/ProtonCppConfig.cmake.in b/cpp/ProtonCppConfig.cmake.in
index 74ddfaa..2fece73 100644
--- a/cpp/ProtonCppConfig.cmake.in
+++ b/cpp/ProtonCppConfig.cmake.in
@@ -20,19 +20,21 @@
# Name: Proton
# Description: Qpid Proton C library
# Version: @PN_VERSION@
@@ -23,7 +23,9 @@
# URL: http://qpid.apache.org/proton/
@PACKAGE_INIT@
@ -106,12 +114,3 @@ index 03fe80a..fd6a31d 100644
include("${CMAKE_CURRENT_LIST_DIR}/ProtonCppTargets.cmake")
else()
include("${CMAKE_CURRENT_LIST_DIR}/ProtonCppTargetsStatic.cmake")
endif()
set (ProtonCpp_VERSION @PN_VERSION@)
set (ProtonCpp_INCLUDE_DIRS @PACKAGE_INCLUDE_INSTALL_DIR@)
set (ProtonCpp_LIBRARIES Proton::cpp)
set (ProtonCpp_FOUND True)
check_required_components(ProtonCpp)

View File

@ -32,6 +32,7 @@ vcpkg_cmake_configure(
-DENABLE_WARNING_ERROR=OFF
-DENABLE_BENCHMARKS=OFF
-DENABLE_FUZZ_TESTING=OFF
-DBUILD_EXAMPLES=OFF
-DBUILD_TESTING=OFF
-DCMAKE_INSTALL_RPATH=${rpath}
-DPython_EXECUTABLE=${PYTHON3}

View File

@ -1,7 +1,7 @@
{
"name": "qpid-proton",
"version": "0.37.0",
"port-version": 2,
"port-version": 3,
"description": "Qpid Proton is a high-performance, lightweight messaging library.",
"homepage": "https://github.com/apache/qpid-proton",
"license": "Apache-2.0",

View File

@ -1,19 +1,23 @@
diff --git a/tensorpipe/CMakeLists.txt b/tensorpipe/CMakeLists.txt
index efcffc2..e167fae 100644
index efcffc2..dd9bd16 100644
--- a/tensorpipe/CMakeLists.txt
+++ b/tensorpipe/CMakeLists.txt
@@ -119,8 +119,8 @@ list(APPEND TP_PUBLIC_HDRS
@@ -119,8 +119,12 @@ list(APPEND TP_PUBLIC_HDRS
transport/uv/utility.h)
# Add uv package
-find_package(uv REQUIRED)
-list(APPEND TP_LINK_LIBRARIES uv::uv)
+find_package(unofficial-libuv CONFIG REQUIRED)
+list(APPEND TP_LINK_LIBRARIES unofficial::libuv::libuv)
+find_package(libuv CONFIG REQUIRED)
+if (TARGET uv)
+list(APPEND TP_LINK_LIBRARIES uv)
+else()
+list(APPEND TP_LINK_LIBRARIES uv_a)
+endif()
### shm
@@ -184,7 +184,8 @@ configure_file(config.h.in config.h)
@@ -184,7 +188,8 @@ configure_file(config.h.in config.h)
# We should keep libnop headers private as they should not be exposed to downstream users,
# but they're currently transitively included by tensorpipe/transport/connection.h (which
# is still unclear whether it should be a public or private header).

View File

@ -1,6 +1,7 @@
{
"name": "tensorpipe",
"version-date": "2022-03-16",
"port-version": 1,
"description": "A tensor-aware point-to-point communication primitive for machine learning",
"homepage": "https://github.com/pytorch/tensorpipe",
"license": "BSD-3-Clause",

View File

@ -12,10 +12,12 @@ else()
set(NOT_USE_OPENSSL "-DLIBUS_NO_SSL")
endif()
find_package(unofficial-libuv CONFIG REQUIRED)
find_path(LIBUV_INCLUDE_DIR uv.h)
find_library(LIBUV_LIBRARY NAMES libuv)
include_directories(APPEND "${CMAKE_CURRENT_LIST_DIR}/src")
find_package(libuv CONFIG REQUIRED)
if (TARGET uv)
set(LIBUV_LIBRARY uv)
else()
set(LIBUV_LIBRARY uv_a)
endif()
file(GLOB SOURCES src/*.c src/eventing/*.c)
@ -49,7 +51,7 @@ if (${LIBUS_USE_LIBUV})
endif()
target_compile_definitions(uSockets PRIVATE ${NOT_USE_OPENSSL} ${USE_OPENSSL})
target_include_directories(uSockets PUBLIC ${OPENSSL_INCLUDE_DIR} ${LIBUV_INCLUDE_DIR} ${USOCKETS_EXT_INCLUDE_DIR})
target_include_directories(uSockets PUBLIC ${OPENSSL_INCLUDE_DIR} ${USOCKETS_EXT_INCLUDE_DIR} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/src")
target_link_libraries(uSockets PUBLIC ${OPENSSL_LIBRARIES} ${LIBUV_LIBRARY} ${USOCKETS_EXT_LIBS})
install(TARGETS uSockets

View File

@ -1,8 +1,10 @@
{
"name": "usockets",
"version": "0.8.1",
"port-version": 1,
"description": "Miniscule cross-platform eventing, networking & crypto for async applications",
"homepage": "https://github.com/uNetworking/uSockets",
"license": "Apache-2.0",
"dependencies": [
"libuv",
{

View File

@ -1,10 +1,14 @@
cmake_minimum_required(VERSION 3.8)
project(uvw)
find_package(unofficial-libuv CONFIG REQUIRED)
find_package(libuv CONFIG REQUIRED)
add_library(uvw INTERFACE)
target_link_libraries(uvw INTERFACE unofficial::libuv::libuv)
if (TARGET uv)
target_link_libraries(uvw INTERFACE uv)
else()
target_link_libraries(uvw INTERFACE uv_a)
endif()
install(TARGETS uvw
EXPORT uvw

View File

@ -1,6 +1,7 @@
{
"name": "uvw",
"version": "2.12.1",
"port-version": 1,
"description": "Header-only, event based, tiny and easy to use libuv wrapper in modern C++.",
"homepage": "https://github.com/skypjack/uvw",
"license": "MIT",

View File

@ -0,0 +1,32 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3930be2..f57a46b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,7 +87,7 @@ else()
endif()
if (USE_VCPKG_LIBUV)
-set (LIBUV_VCPKG_REPLACE "find_package(unofficial-libuv CONFIG)")
+set (LIBUV_VCPKG_REPLACE "find_package(libuv CONFIG)")
endif()
if (USE_VCPKG_EIGEN)
diff --git a/wpiutil/CMakeLists.txt b/wpiutil/CMakeLists.txt
index 559c8ed..0fe60e9 100644
--- a/wpiutil/CMakeLists.txt
+++ b/wpiutil/CMakeLists.txt
@@ -210,8 +210,12 @@ if (NOT USE_VCPKG_LIBUV)
endif()
endif()
else()
- find_package(unofficial-libuv CONFIG REQUIRED)
- target_link_libraries(wpiutil unofficial::libuv::libuv)
+ find_package(libuv CONFIG REQUIRED)
+ if (TARGET uv)
+ target_link_libraries(wpiutil uv)
+ else()
+ target_link_libraries(wpiutil uv_a)
+ endif()
endif()
if (MSVC)

View File

@ -3,6 +3,7 @@ vcpkg_from_github(
REPO wpilibsuite/allwpilib
REF 35eb90c135eba994a2ca2cbd50a68c367910f4b6
SHA512 55bc608632ab67c097f3cce7c5ad9790b2b123a633c93bf5b4008f90bf79538cc142c911850d5f49b75e3a12f43ffad9f6f5f9bcdf1351cce7513ecc4b04e439
PATCHES fix-dependency-libuv.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
@ -11,10 +12,8 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
allwpilib WITHOUT_ALLWPILIB
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DWITHOUT_JAVA=ON
${FEATURE_OPTIONS}
@ -22,39 +21,39 @@ vcpkg_configure_cmake(
-DUSE_VCPKG_EIGEN=ON
-DFLAT_INSTALL_WPILIB=ON
)
vcpkg_install_cmake()
vcpkg_cmake_install()
file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/ntcore/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/wpiutil/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/include/ntcore/" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/include/wpiutil/" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
if ("allwpilib" IN_LIST FEATURES)
file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/wpilibc/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/hal/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/gen)
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/include/wpilibc/" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/include/hal/" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/gen")
endif()
if ("cameraserver" IN_LIST FEATURES)
file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/cameraserver/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/cscore/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/include/cameraserver/" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/include/cscore/" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
endif()
if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.dll")
file(COPY ${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.dll")
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/bin" FILES_MATCHING PATTERN "*.dll")
file(COPY "${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin" FILES_MATCHING PATTERN "*.dll")
file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.so")
file(COPY ${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.so")
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/bin" FILES_MATCHING PATTERN "*.so")
file(COPY "${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin" FILES_MATCHING PATTERN "*.so")
file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.dylib")
file(COPY ${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.dylib")
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/bin" FILES_MATCHING PATTERN "*.dylib")
file(COPY "${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin" FILES_MATCHING PATTERN "*.dylib")
endif()
file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.lib")
file(COPY ${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib FILES_MATCHING PATTERN "*.lib")
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" FILES_MATCHING PATTERN "*.lib")
file(COPY "${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" FILES_MATCHING PATTERN "*.lib")
file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.a")
file(COPY ${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib FILES_MATCHING PATTERN "*.a")
file(COPY "${CURRENT_PACKAGES_DIR}/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" FILES_MATCHING PATTERN "*.a")
file(COPY "${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" FILES_MATCHING PATTERN "*.a")
vcpkg_copy_pdbs()
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,13 +1,22 @@
{
"name": "wpilib",
"version-string": "2020.3.2",
"port-version": 2,
"version-date": "2020-03-02",
"port-version": 3,
"description": "WPILib is the software library package for the FIRST Robotics Competition. The core install includes wpiutil, a common utilies library, and ntcore, the base NetworkTables library.",
"homepage": "https://github.com/wpilibsuite/allwpilib",
"license": null,
"supports": "!osx",
"dependencies": [
"eigen3",
"libuv"
"libuv",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"allwpilib": {

View File

@ -0,0 +1,28 @@
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)
+ if (TARGET uv)
+ set(CMAKE_LIBUV_LIBRARIES uv)
+ else()
+ set(CMAKE_LIBUV_LIBRARIES uv_a)
+ endif()
else()
set(CMAKE_LIBUV_LIBRARIES cmlibuv)
add_subdirectory(Utilities/cmlibuv)

View File

@ -8,6 +8,7 @@ vcpkg_from_gitlab(
SHA512
4a40656efe5854bd6b893d0b2b86eed5df42992d080edb9c0cb2da2c55ad8dd489a85072b138947933d94ef5ba90c7a59f0a4460e3722d0f898ceefbbf74d226
HEAD_REF master
PATCHES fix-dependency-libuv.patch
)
set(OPTIONS)
if(NOT VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP)

View File

@ -1,6 +1,7 @@
{
"name": "cmake",
"version-string": "3.22.2",
"version": "3.22.2",
"port-version": 1,
"description": "CMake is an open-source, cross-platform family of tools designed to build, test and package software.",
"homepage": "https://cmake.org/",
"license": "BSD-3-Clause",

View File

@ -4189,7 +4189,7 @@
"port-version": 11
},
"libuv": {
"baseline": "1.43.0",
"baseline": "1.44.1",
"port-version": 0
},
"libuvc": {
@ -5726,7 +5726,7 @@
},
"qpid-proton": {
"baseline": "0.37.0",
"port-version": 2
"port-version": 3
},
"qscintilla": {
"baseline": "2.12.0",
@ -6986,7 +6986,7 @@
},
"tensorpipe": {
"baseline": "2022-03-16",
"port-version": 0
"port-version": 1
},
"termcolor": {
"baseline": "2.1.0",
@ -7322,7 +7322,7 @@
},
"usockets": {
"baseline": "0.8.1",
"port-version": 0
"port-version": 1
},
"usrsctp": {
"baseline": "0.9.5.0",
@ -7358,7 +7358,7 @@
},
"uvw": {
"baseline": "2.12.1",
"port-version": 0
"port-version": 1
},
"uwebsockets": {
"baseline": "20.11.0",
@ -7621,8 +7621,8 @@
"port-version": 1
},
"wpilib": {
"baseline": "2020.3.2",
"port-version": 2
"baseline": "2020-03-02",
"port-version": 3
},
"wren": {
"baseline": "0.4.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4560e3046488c518b6573a14d7ad063a02f52db9",
"version-semver": "1.44.1",
"port-version": 0
},
{
"git-tree": "fa2d73ef2b9197ea47572bc783826b650ed04f0f",
"version-semver": "1.43.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "32527f3a05b41a04ad42ab2e0827dfee69b18ec0",
"version": "0.37.0",
"port-version": 3
},
{
"git-tree": "e019a7a0cb758104296c13689ca86f44db64cfb6",
"version": "0.37.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4b982c4ade4582a5728384f2871610b107fe1b9f",
"version-date": "2022-03-16",
"port-version": 1
},
{
"git-tree": "f78594bb71084f0ea1b9e0bba9b9804696e4c011",
"version-date": "2022-03-16",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "bf42304e17879df7e100c97d4487adaeaadfd87e",
"version": "0.8.1",
"port-version": 1
},
{
"git-tree": "de62ce303388342f83a490f69bdb92ec41ecc0f2",
"version": "0.8.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "609b48de110aa8763d8f4a674ac3aa7c5821382f",
"version": "2.12.1",
"port-version": 1
},
{
"git-tree": "eac81a2d74241ded58a1c503d91f226f86ca09c6",
"version": "2.12.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1593dcc61c40d6205be6d47e3623dc6bb3ddbad3",
"version-date": "2020-03-02",
"port-version": 3
},
{
"git-tree": "cf10ef63982d54978a85c868d37462ce21643188",
"version-string": "2020.3.2",