From abbafe4ee054576e4175762cc5caeb03fccea497 Mon Sep 17 00:00:00 2001 From: quguiren Date: Tue, 14 Nov 2023 09:54:57 +0800 Subject: [PATCH] third-party library Signed-off-by: quguiren --- lib/BUILD.gn | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/BUILD.gn b/lib/BUILD.gn index 49b433bf..e8ce2429 100644 --- a/lib/BUILD.gn +++ b/lib/BUILD.gn @@ -95,6 +95,7 @@ if (defined(ohos_lite)) { ] } } else { + import("//build/config/config.gni") import("//build/ohos.gni") ohos_static_library("nghttp2") { @@ -120,6 +121,14 @@ if (defined(ohos_lite)) { "HAVE_NETINET_IN_H=1", ] } + if (current_os == "ios") { + ldflags = [ + "-Wl", + "-install_name", + "@rpath/libnghttp2.framework/libnghttp2", + ] + output_name = "nghttp2" + } sources = nghttp2_lib_sources if (target_os != "ios") { if (product_name != "ohos-sdk") { @@ -134,4 +143,12 @@ if (defined(ohos_lite)) { innerapi_tags = [ "platformsdk" ] part_name = "nghttp2" } + + if (current_os == "ios") { + ohos_combine_darwin_framework("libnghttp2") { + deps = [ ":libnghttp2_shared" ] + subsystem_name = "thirdparty" + part_name = "nghttp2" + } + } }