# Copyright (c) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build/ohos.gni")
import("//plugins/web/webview/web_webview.gni")

ohos_source_set("web_webview_ios") {
  sources = [
    "web_cookie_manager_ios.mm",
    "web_data_base_ios.cpp",
    "web_download_manager_ios.cpp",
    "web_message_port_ios.cpp",
    "webview_controller_ios.cpp",
  ]

  include_dirs = web_include
  include_dirs += [ "${WEB_PLUGIN_ROOT_DIR}" ]
  include_dirs +=
      [ "//foundation/arkui/ace_engine/adapter/ios/capability/web/" ]

  defines = [ "IOS_PLATFORM" ]

  deps = [ "//plugins/interfaces/native:ace_plugin_util_ios" ]
  deps += [ "//foundation/arkui/ace_engine/adapter/ios/build:libarkui_ios" ]

  subsystem_name = "plugins"
  part_name = "web_webview"
}