[netcpp] Update to 0.5.0 (#40870)

This commit is contained in:
한태현 2024-09-11 09:42:43 +09:00 committed by GitHub
parent b810d1cdd4
commit ee2d2a1001
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 44 additions and 71 deletions

View File

@ -1,33 +0,0 @@
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

View File

@ -1,29 +1,30 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO index1207/netcpp
REF "v${VERSION}"
SHA512 18b322ec599dc2ece84d31bf723e8d1c8bf107e93a39a58dee27e7e59de7e0387c72a638d5a59eda43706f39a054b3325e3f40f093edf8d673061c526d30b06b
SHA512 5f0c7a9ad414b868c23cde4c16a605c2029631935b252b3faa4e485ec1efa3dbfe64fd0b068db8e018481b6ac83f819facc1db371470be42c6919fcf69005e17
HEAD_REF release
PATCHES
pkgconfig.patch
)
if (VCPKG_TARGET_IS_LINUX)
vcpkg_find_acquire_program(PKGCONFIG)
endif ()
set(options -DNETCPP_TEST=OFF)
vcpkg_find_acquire_program(PKGCONFIG)
list(APPEND options "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}")
if ("${VCPKG_LIBRARY_LINKAGE}" STREQUAL "dynamic")
list(APPEND options -DNETCPP_BUILD_SHARED=ON)
endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DINCLUDE_TEST=OFF
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
${options}
MAYBE_UNUSED_VARIABLES
PKG_CONFIG_EXECUTABLE
)
vcpkg_fixup_pkgconfig()
vcpkg_cmake_install()
vcpkg_fixup_pkgconfig()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/netcpp PACKAGE_NAME netcpp)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

View File

@ -1,6 +1,6 @@
{
"name": "netcpp",
"version": "0.4.1",
"version": "0.5.0",
"description": "A simple asynchronous network library",
"homepage": "https://github.com/index1207/netcpp",
"license": "MIT",

View File

@ -6241,7 +6241,7 @@
"port-version": 5
},
"netcpp": {
"baseline": "0.4.1",
"baseline": "0.5.0",
"port-version": 0
},
"netgen": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a6b9de73a8c7899d0e814723cebae0e0d49209a6",
"version": "0.5.0",
"port-version": 0
},
{
"git-tree": "31b03887dbbc3cd3e44aebfd261ff1bda934c9a3",
"version": "0.4.1",