Update nghttp3 to 1.3.0 (#4037)
* Update nghttp3 to 1.3.0 * Update xmake.lua * vendor sfparse * Update xmake.lua * improve sfparse includedirs * fix shared * Revert "fix shared" This reverts commitpull/4045/headbe07f5ec32
. * Revert "improve sfparse includedirs" This reverts commit6248342ec5
. * fix link on linux --------- Co-authored-by: star9029 <hengxings783@gmail.com>
parent
f8b898dc4b
commit
f2ccd0ecd9
3 changed files with 62 additions and 5 deletions
@ -0,0 +1,26 @@ |
||||
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
|
||||
index 2f7e31c..3e3d7fb 100644
|
||||
--- a/lib/CMakeLists.txt
|
||||
+++ b/lib/CMakeLists.txt
|
||||
@@ -60,12 +60,12 @@ set(nghttp3_SOURCES
|
||||
nghttp3_opl.c
|
||||
nghttp3_objalloc.c
|
||||
nghttp3_unreachable.c
|
||||
- sfparse/sfparse.c
|
||||
)
|
||||
|
||||
# Public shared library
|
||||
if(ENABLE_SHARED_LIB)
|
||||
add_library(nghttp3 SHARED ${nghttp3_SOURCES})
|
||||
+ target_link_libraries(nghttp3 sfparse)
|
||||
set_target_properties(nghttp3 PROPERTIES
|
||||
COMPILE_FLAGS "${WARNCFLAGS}"
|
||||
VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION}
|
||||
@@ -81,6 +81,7 @@ endif()
|
||||
if(ENABLE_STATIC_LIB)
|
||||
# Public static library
|
||||
add_library(nghttp3_static STATIC ${nghttp3_SOURCES})
|
||||
+ target_link_libraries(nghttp3_static sfparse)
|
||||
set_target_properties(nghttp3_static PROPERTIES
|
||||
COMPILE_FLAGS "${WARNCFLAGS}"
|
||||
VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION}
|
@ -0,0 +1,27 @@ |
||||
package("sfparse") |
||||
set_homepage("https://github.com/ngtcp2/sfparse") |
||||
set_description("Structured Field Values parser") |
||||
set_license("MIT") |
||||
|
||||
set_urls("https://github.com/ngtcp2/sfparse.git", {submodules = false}) |
||||
add_versions("2024.05.12", "c669673012f9d535ec3bcf679fe911c8c75a479f") |
||||
|
||||
add_includedirs("include", "include/sfparse") |
||||
|
||||
on_install(function (package) |
||||
io.writefile("xmake.lua", [[ |
||||
add_rules("mode.debug", "mode.release") |
||||
target("sfparse") |
||||
set_kind("$(kind)") |
||||
add_files("sfparse.c") |
||||
add_headerfiles("sfparse.h", {prefixdir = "sfparse"}) |
||||
if is_plat("windows") and is_kind("shared") then |
||||
add_rules("utils.symbols.export_all") |
||||
end |
||||
]]) |
||||
import("package.tools.xmake").install(package) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cfuncs("sf_parser_param", {includes = "sfparse.h"})) |
||||
end) |
Loading…
Reference in new issue