mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 11:57:58 +08:00
[netcpp] Update to 0.4.1 (#40566)
This commit is contained in:
parent
a6212db191
commit
1d8654234d
33
ports/netcpp/pkgconfig.patch
Normal file
33
ports/netcpp/pkgconfig.patch
Normal file
@ -0,0 +1,33 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ffb6c54..e5656c6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -8,6 +8,8 @@ include(GNUInstallDirs)
|
||||
if (MSVC)
|
||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG")
|
||||
else()
|
||||
+ find_package(PkgConfig REQUIRED)
|
||||
+ pkg_check_modules(URING REQUIRED liburing)
|
||||
add_compile_definitions(_LIBCPP_ENABLE_EXPERIMENTAL)
|
||||
endif(MSVC)
|
||||
add_compile_definitions(NETCPP_BUILD)
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 9c54dca..f67ed18 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -4,6 +4,13 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
add_library(${PROJECT_NAME} STATIC ${SOURCE_FILES})
|
||||
add_library(${EXPORT_NAMESPACE}${PROJECT_NAME} ALIAS ${PROJECT_NAME})
|
||||
|
||||
-target_include_directories(netcpp PUBLIC
|
||||
+target_include_directories(${PROJECT_NAME} PUBLIC
|
||||
$<BUILD_INTERFACE:${INCLUDES}>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
||||
+
|
||||
+if (MSVC)
|
||||
+ target_link_libraries(${PROJECT_NAME} PRIVATE ws2_32)
|
||||
+else ()
|
||||
+ target_include_directories(${PROJECT_NAME} PRIVATE ${URING_INCLUDE_DIRS})
|
||||
+ target_link_libraries(${PROJECT_NAME} PRIVATE ${URING_LINK_LIBRARIES})
|
||||
+endif ()
|
||||
\ No newline at end of file
|
@ -4,15 +4,25 @@ vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO index1207/netcpp
|
||||
REF "v${VERSION}"
|
||||
SHA512 5f4f99a65ce373f1712bf8fb90e5de4f9945f3467e6535e69fad49898fd8dae1fa534e27070d16557b05ee9fa4e3551900062f6c8220a2bd3b197cce82a57182
|
||||
SHA512 18b322ec599dc2ece84d31bf723e8d1c8bf107e93a39a58dee27e7e59de7e0387c72a638d5a59eda43706f39a054b3325e3f40f093edf8d673061c526d30b06b
|
||||
HEAD_REF release
|
||||
PATCHES
|
||||
pkgconfig.patch
|
||||
)
|
||||
|
||||
if (VCPKG_TARGET_IS_LINUX)
|
||||
vcpkg_find_acquire_program(PKGCONFIG)
|
||||
endif ()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DINCLUDE_TEST=OFF
|
||||
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
PKG_CONFIG_EXECUTABLE
|
||||
)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/netcpp PACKAGE_NAME netcpp)
|
||||
|
||||
|
@ -1,11 +1,15 @@
|
||||
{
|
||||
"name": "netcpp",
|
||||
"version": "0.3.4",
|
||||
"version": "0.4.1",
|
||||
"description": "A simple asynchronous network library",
|
||||
"homepage": "https://github.com/index1207/netcpp",
|
||||
"license": "MIT",
|
||||
"supports": "windows",
|
||||
"supports": "windows | linux",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "liburing",
|
||||
"platform": "linux"
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
@ -13,7 +17,6 @@
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
"winsock2"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -6205,7 +6205,7 @@
|
||||
"port-version": 5
|
||||
},
|
||||
"netcpp": {
|
||||
"baseline": "0.3.4",
|
||||
"baseline": "0.4.1",
|
||||
"port-version": 0
|
||||
},
|
||||
"netgen": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "31b03887dbbc3cd3e44aebfd261ff1bda934c9a3",
|
||||
"version": "0.4.1",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "367142eff1e20648f9eda61fb0544233e255c806",
|
||||
"version": "0.3.4",
|
||||
|
Loading…
x
Reference in New Issue
Block a user