From c04f021ef01a6bfce1661b289b6f7a90d122616d Mon Sep 17 00:00:00 2001 From: quguiren Date: Thu, 1 Feb 2024 17:34:10 +0800 Subject: [PATCH] deps fix Signed-off-by: quguiren --- BUILD.gn | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index 7232ead..4c54087 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -1,5 +1,6 @@ # Copyright (c) 2023 Huawei Device Co., Ltd. All rights reserved. +import("//build/config/config.gni") import("//build/ohos.gni") import("//build/ohos/ndk/ndk.gni") @@ -90,6 +91,14 @@ ohos_shared_library("shared_libz") { configs = [ ":zlib_config" ] public_configs = [ ":zlib_public_config" ] + if (current_os == "ios") { + ldflags = [ + "-Wl", + "-install_name", + "@rpath/libshared_libz.framework/libshared_libz", + ] + } + install_images = [ "system", "updater", @@ -102,6 +111,14 @@ ohos_shared_library("shared_libz") { subsystem_name = "thirdparty" } +if (current_os == "ios") { + ohos_combine_darwin_framework("libshared_libz") { + deps = [ ":shared_libz" ] + subsystem_name = "thirdparty" + part_name = "zlib" + } +} + ohos_ndk_headers("zlib_header") { sources = [ "./zconf.h", -- Gitee