10826e83eSopenharmony_ci# Copyright (c) 2021-2022 Huawei Device Co., Ltd. 20826e83eSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 30826e83eSopenharmony_ci# you may not use this file except in compliance with the License. 40826e83eSopenharmony_ci# You may obtain a copy of the License at 50826e83eSopenharmony_ci# 60826e83eSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 70826e83eSopenharmony_ci# 80826e83eSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 90826e83eSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 100826e83eSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 110826e83eSopenharmony_ci# See the License for the specific language governing permissions and 120826e83eSopenharmony_ci# limitations under the License. 130826e83eSopenharmony_ci 140826e83eSopenharmony_ciimport("//build/ohos.gni") 150826e83eSopenharmony_ciimport("//build/ohos/ndk/ndk.gni") 160826e83eSopenharmony_ci 170826e83eSopenharmony_ciohos_ndk_headers("web_header") { 180826e83eSopenharmony_ci dest_dir = "$ndk_headers_out_dir/web/" 190826e83eSopenharmony_ci sources = [ 200826e83eSopenharmony_ci "arkweb_interface.h", 210826e83eSopenharmony_ci "arkweb_type.h", 220826e83eSopenharmony_ci "native_interface_arkweb.h", 230826e83eSopenharmony_ci ] 240826e83eSopenharmony_ci} 250826e83eSopenharmony_ci 260826e83eSopenharmony_ciohos_ndk_library("libohweb") { 270826e83eSopenharmony_ci cflags = [ "-fstack-protector-all" ] 280826e83eSopenharmony_ci min_compact_version = "11" 290826e83eSopenharmony_ci ndk_description_file = "./libohweb.ndk.json" 300826e83eSopenharmony_ci system_capability = "SystemCapability.Web.Webview.Core" 310826e83eSopenharmony_ci output_name = "ohweb" 320826e83eSopenharmony_ci} 330826e83eSopenharmony_ci 340826e83eSopenharmony_ciohos_shared_library("ohweb") { 350826e83eSopenharmony_ci if (target_cpu == "arm64") { 360826e83eSopenharmony_ci branch_protector_ret = "pac_ret" 370826e83eSopenharmony_ci branch_protector_frt = "bti" 380826e83eSopenharmony_ci } 390826e83eSopenharmony_ci 400826e83eSopenharmony_ci output_extension = "so" 410826e83eSopenharmony_ci include_dirs = [ "../../ohos_nweb/include" ] 420826e83eSopenharmony_ci 430826e83eSopenharmony_ci sources = [ 440826e83eSopenharmony_ci "arkweb_interface.cpp", 450826e83eSopenharmony_ci "arkweb_scheme_handler.cpp", 460826e83eSopenharmony_ci "native_arkweb_utils.cpp", 470826e83eSopenharmony_ci "native_interface_arkweb.cpp", 480826e83eSopenharmony_ci "native_javascript_execute_callback.cpp", 490826e83eSopenharmony_ci ] 500826e83eSopenharmony_ci 510826e83eSopenharmony_ci external_deps = [ 520826e83eSopenharmony_ci "c_utils:utils", 530826e83eSopenharmony_ci "hilog:libhilog", 540826e83eSopenharmony_ci "napi:ace_napi", 550826e83eSopenharmony_ci ] 560826e83eSopenharmony_ci 570826e83eSopenharmony_ci deps = [ "../../ohos_nweb:libnweb" ] 580826e83eSopenharmony_ci relative_install_dir = "ndk" 590826e83eSopenharmony_ci part_name = "webview" 600826e83eSopenharmony_ci subsystem_name = "web" 610826e83eSopenharmony_ci} 620826e83eSopenharmony_ci 630826e83eSopenharmony_cigroup("webview_ndk") { 640826e83eSopenharmony_ci deps = [ 650826e83eSopenharmony_ci ":libohweb", 660826e83eSopenharmony_ci ":ohweb", 670826e83eSopenharmony_ci ] 680826e83eSopenharmony_ci} 69